Have the default ParseConfig() function add -pthread to both and . (Gary Oberbrunner)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 16 Aug 2004 14:43:56 +0000 (14:43 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 16 Aug 2004 14:43:56 +0000 (14:43 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1030 fdb21ef1-2011-0410-befe-b5e4ea1792b1

doc/man/scons.1
src/CHANGES.txt
src/engine/SCons/Environment.py
src/engine/SCons/EnvironmentTests.py

index f9138a73e34103e93f4410306fae58b9249cfbfe..c4335a8323450b1cb41d672309d9a14f58595412 100644 (file)
@@ -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
index 766fbc871067b52c23efa5b253d12b974ebf0689..6b6fdeae598e3840f0cc5cf5d33b84f7b4ee2da2 100644 (file)
@@ -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.
index fc4dba05d612b3430a23a631c70dc913878f7c19..32fa1e6333d3be0f4bba5672ff21ce5a78c8174c 100644 (file)
@@ -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)
index e8f3cd84d857840be8eb0edfd25db645c462ffff..810f3077877ff3bb6e1f6592383eddbeb9ac1376 100644 (file)
@@ -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