[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16592] trunk/blender: scons options BF_CXX, WITH_BF_STATICCXX, BF_CXX_LIB_STATIC for static linking to stdc++ because of problems running blender on some systems .

Campbell Barton ideasman42 at gmail.com
Thu Sep 18 05:05:03 CEST 2008


Revision: 16592
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16592
Author:   campbellbarton
Date:     2008-09-18 05:05:02 +0200 (Thu, 18 Sep 2008)

Log Message:
-----------
scons options BF_CXX, WITH_BF_STATICCXX, BF_CXX_LIB_STATIC for static linking to stdc++ because of problems running blender on some systems.

Modified Paths:
--------------
    trunk/blender/SConstruct
    trunk/blender/config/darwin-config.py
    trunk/blender/config/linux2-config.py
    trunk/blender/config/linuxcross-config.py
    trunk/blender/config/sunos5-config.py
    trunk/blender/config/win32-vc-config.py
    trunk/blender/tools/Blender.py
    trunk/blender/tools/btools.py

Modified: trunk/blender/SConstruct
===================================================================
--- trunk/blender/SConstruct	2008-09-18 01:59:10 UTC (rev 16591)
+++ trunk/blender/SConstruct	2008-09-18 03:05:02 UTC (rev 16592)
@@ -241,6 +241,13 @@
     for l in B.quickdebug:
         print "\t" + l
 
+# remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
+if env['WITH_BF_STATICCXX']:
+    if 'stdc++' in env['LLIBS']:
+        env['LLIBS'] = env['LLIBS'].replace('stdc++', ' ')
+    else:
+        print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
+
 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
 if 'blenderplayer' in B.targets:
     env['WITH_BF_PLAYER'] = True

Modified: trunk/blender/config/darwin-config.py
===================================================================
--- trunk/blender/config/darwin-config.py	2008-09-18 01:59:10 UTC (rev 16591)
+++ trunk/blender/config/darwin-config.py	2008-09-18 03:05:02 UTC (rev 16592)
@@ -95,6 +95,11 @@
 # Warning, this static lib configuration is untested! users of this OS please confirm.
 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
 
+# Warning, this static lib configuration is untested! users of this OS please confirm.
+BF_CXX = '/usr'
+WITH_BF_STATICCXX = 'false'
+BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
+
 WITH_BF_SDL = 'true'
 BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
 BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)

Modified: trunk/blender/config/linux2-config.py
===================================================================
--- trunk/blender/config/linux2-config.py	2008-09-18 01:59:10 UTC (rev 16591)
+++ trunk/blender/config/linux2-config.py	2008-09-18 03:05:02 UTC (rev 16592)
@@ -25,6 +25,10 @@
 # BF_OPENAL_LIB = 'openal alut'  
 # BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a ${BF_OPENAL}/lib/libalut.a'
 
+BF_CXX = '/usr'
+WITH_BF_STATICCXX = 'false'
+BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
+
 WITH_BF_SDL = 'true'
 BF_SDL = '/usr' #$(shell sdl-config --prefix)
 BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)

Modified: trunk/blender/config/linuxcross-config.py
===================================================================
--- trunk/blender/config/linuxcross-config.py	2008-09-18 01:59:10 UTC (rev 16591)
+++ trunk/blender/config/linuxcross-config.py	2008-09-18 03:05:02 UTC (rev 16592)
@@ -22,6 +22,11 @@
 # Warning, this static lib configuration is untested! users of this OS please confirm.
 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
 
+# Warning, this static lib configuration is untested! users of this OS please confirm.
+BF_CXX = '/usr'
+WITH_BF_STATICCXX = 'false'
+BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
+
 WITH_BF_SDL = 'true'
 BF_SDL = LIBDIR + '/sdl'
 BF_SDL_INC = '${BF_SDL}/include'

Modified: trunk/blender/config/sunos5-config.py
===================================================================
--- trunk/blender/config/sunos5-config.py	2008-09-18 01:59:10 UTC (rev 16591)
+++ trunk/blender/config/sunos5-config.py	2008-09-18 03:05:02 UTC (rev 16592)
@@ -17,6 +17,11 @@
 # Warning, this static lib configuration is untested! users of this OS please confirm.
 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
 
+# Warning, this static lib configuration is untested! users of this OS please confirm.
+BF_CXX = '/usr'
+WITH_BF_STATICCXX = 'false'
+BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
+
 WITH_BF_SDL = 'true'
 BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
 BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)

Modified: trunk/blender/config/win32-vc-config.py
===================================================================
--- trunk/blender/config/win32-vc-config.py	2008-09-18 01:59:10 UTC (rev 16591)
+++ trunk/blender/config/win32-vc-config.py	2008-09-18 03:05:02 UTC (rev 16592)
@@ -27,6 +27,11 @@
 # Warning, this static lib configuration is untested! users of this OS please confirm.
 BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
 
+# TODO - are these useful on win32?
+# BF_CXX = '/usr'
+# WITH_BF_STATICCXX = 'false'
+# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
+
 WITH_BF_ICONV = 'true'
 BF_ICONV = LIBDIR + '/iconv'
 BF_ICONV_INC = '${BF_ICONV}/include'

Modified: trunk/blender/tools/Blender.py
===================================================================
--- trunk/blender/tools/Blender.py	2008-09-18 01:59:10 UTC (rev 16591)
+++ trunk/blender/tools/Blender.py	2008-09-18 03:05:02 UTC (rev 16592)
@@ -120,7 +120,8 @@
     
     
     libincs += Split(lenv['BF_FFMPEG_LIBPATH'])
-    
+    if lenv['WITH_BF_STATICCXX']:
+        statlibs += Split(lenv['BF_CXX_LIB_STATIC'])
     if lenv['WITH_BF_OPENEXR']:
         libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
         if lenv['WITH_BF_STATICOPENEXR']:

Modified: trunk/blender/tools/btools.py
===================================================================
--- trunk/blender/tools/btools.py	2008-09-18 01:59:10 UTC (rev 16591)
+++ trunk/blender/tools/btools.py	2008-09-18 03:05:02 UTC (rev 16592)
@@ -55,8 +55,9 @@
             'CFLAGS', 'CCFLAGS', 'CPPFLAGS', 
             'REL_CFLAGS', 'REL_CCFLAGS',
             'C_WARN', 'CC_WARN', 'LLIBS', 'PLATFORM_LINKFLAGS',
-            'BF_PROFILE_FLAGS', 'LCGDIR', 'WITH_BF_VERSE', 
-            'BF_VERSE_INCLUDE',
+            'BF_PROFILE_FLAGS', 'LCGDIR',
+            'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC'
+            'WITH_BF_VERSE', 'BF_VERSE_INCLUDE',
             'VERSE_BUILD_BINARY', 'VERSE_BUILD_DIR', 'VERSE_REGEN_PROTO',
             'BF_TWEAK_MODE', 'BF_SPLIT_SRC',
             'WITHOUT_BF_INSTALL',
@@ -256,6 +257,9 @@
         ('BF_SOLID_INC', 'Solid include path', ''),
         ('BF_WINTAB', 'WinTab base dir', ''),
         ('BF_WINTAB_INC', 'WinTab include dir', ''),
+        ('BF_CXX', 'c++ base path for libstdc++, only used when static linking', ''),
+        ('WITH_BF_STATICCXX', 'static link to stdc++', 'false'),
+        ('BF_CXX_LIB_STATIC', 'static library path for stdc++', ''),
 ##
 ##WITH_BF_NSPR = 'true'
 ##BF_NSPR = $(LCGDIR)/nspr





More information about the Bf-blender-cvs mailing list