summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-08-16 14:43:56 (GMT)
committerSteven Knight <knight@baldmt.com>2004-08-16 14:43:56 (GMT)
commite1dd4cf095ba4e90da77bd69bd7c738937c36585 (patch)
tree786fbe3c66b0308f789a5f7e6f39aab96a0c7e45 /src
parentb4c0313f3920d85f653456c0ad877e8c868c207a (diff)
downloadSCons-e1dd4cf095ba4e90da77bd69bd7c738937c36585.zip
SCons-e1dd4cf095ba4e90da77bd69bd7c738937c36585.tar.gz
SCons-e1dd4cf095ba4e90da77bd69bd7c738937c36585.tar.bz2
Have the default ParseConfig() function add -pthread to both and . (Gary Oberbrunner)
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/engine/SCons/Environment.py3
-rw-r--r--src/engine/SCons/EnvironmentTests.py6
3 files changed, 9 insertions, 3 deletions
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