diff options
author | Steven Knight <knight@baldmt.com> | 2004-08-16 14:43:56 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-08-16 14:43:56 (GMT) |
commit | e1dd4cf095ba4e90da77bd69bd7c738937c36585 (patch) | |
tree | 786fbe3c66b0308f789a5f7e6f39aab96a0c7e45 | |
parent | b4c0313f3920d85f653456c0ad877e8c868c207a (diff) | |
download | SCons-e1dd4cf095ba4e90da77bd69bd7c738937c36585.zip SCons-e1dd4cf095ba4e90da77bd69bd7c738937c36585.tar.gz SCons-e1dd4cf095ba4e90da77bd69bd7c738937c36585.tar.bz2 |
Have the default ParseConfig() function add -pthread to both and . (Gary Oberbrunner)
-rw-r--r-- | doc/man/scons.1 | 7 | ||||
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Environment.py | 3 | ||||
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 6 |
4 files changed, 16 insertions, 3 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index f9138a7..c4335a8 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -3038,6 +3038,13 @@ and .B CCFLAGS variables, respectively. +A returned +.B -pthread +option gets added to both the +.B CCFLAGS +and +.B LINKFLAGS +variables. '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .TP diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 766fbc8..6b6fdea 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -217,6 +217,9 @@ RELEASE 0.96 - XXX - Add a section describing File and Directory Nodes and some of their attributes and methods. + - Have ParseConfig() add a returned -pthread flag to both $CCFLAGS + and $LINKFLAGS. + From Simon Perkins: - Fix a bug introduced in building shared libraries under MinGW. diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index fc4dba0..32fa1e6 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -749,6 +749,9 @@ class Base: dict['LINKFLAGS'].append(arg) elif arg[:4] == '-Wp,': dict['CPPFLAGS'].append(arg) + elif arg == '-pthread': + dict['CCFLAGS'].append(arg) + dict['LINKFLAGS'].append(arg) else: dict['CCFLAGS'].append(arg) apply(env.Append, (), dict) diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index e8f3cd8..810f307 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -1335,7 +1335,7 @@ class EnvironmentTestCase(unittest.TestCase): def read(self): return "-I/usr/include/fum -Ibar -X\n" + \ "-L/usr/fax -Lfoo -lxxx " + \ - "-Wa,-as -Wl,-link -Wp,-cpp abc" + "-Wa,-as -Wl,-link -Wp,-cpp abc -pthread" return fake_file() try: os.popen = my_popen @@ -1347,8 +1347,8 @@ class EnvironmentTestCase(unittest.TestCase): assert env['CPPFLAGS'] == ['', '-Wp,-cpp'], env['CPPFLAGS'] assert env['LIBPATH'] == ['list', '/usr/fax', 'foo'], env['LIBPATH'] assert env['LIBS'] == ['xxx'], env['LIBS'] - assert env['LINKFLAGS'] == ['', '-Wl,-link'], env['LINKFLAGS'] - assert env['CCFLAGS'] == ['', '-X'], env['CCFLAGS'] + assert env['LINKFLAGS'] == ['', '-Wl,-link', '-pthread'], env['LINKFLAGS'] + assert env['CCFLAGS'] == ['', '-X', '-pthread'], env['CCFLAGS'] finally: os.popen = orig_popen |