Change scons so OpenMP library is appended at end of linkage line with other
authorKen Hughes <khughes@pacific.edu>
Thu, 17 Apr 2008 19:01:00 +0000 (19:01 +0000)
committerKen Hughes <khughes@pacific.edu>
Thu, 17 Apr 2008 19:01:00 +0000 (19:01 +0000)
libraries (fixes a problem with statically linking OpenMP).

SConstruct
tools/Blender.py

index a42a7ce40a0fd55c21bcc9778e322fdcf9e94eba..47914b8853daec8dc0419dcdb5e9ef4165509b91 100644 (file)
@@ -189,7 +189,6 @@ if env['WITH_BF_OPENMP'] == 1:
                        env['CPPFLAGS'].append('-openmp')
                        env['CXXFLAGS'].append('-openmp')
                else:
-                       env.Append(LINKFLAGS=['-lgomp'])
                        env['CCFLAGS'].append('-fopenmp')
                        env['CPPFLAGS'].append('-fopenmp')
                        env['CXXFLAGS'].append('-fopenmp')
index 967bf1fcd3c13483e6641a55e27b2b9a6516cfe0..30e9979cf9a0205b2791106c629b466ecc33de00 100644 (file)
@@ -152,6 +152,8 @@ def setup_syslibs(lenv):
         syslibs += Split(lenv['BF_GETTEXT_LIB'])
     if lenv['WITH_BF_OPENAL']:
        syslibs += Split(lenv['BF_OPENAL_LIB'])
+    if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc':
+        syslibs += ['gomp']
     if lenv['WITH_BF_ICONV']:
         syslibs += Split(lenv['BF_ICONV_LIB'])
     if lenv['WITH_BF_OPENEXR']: