diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2013-09-28 22:42:14 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2013-09-28 22:42:14 +0400 |
commit | f418097bc600fab537538ede72923d833ce60573 (patch) | |
tree | 43dba42a224cf861e3788fe27c12e8f2e36f1fe6 /build_files | |
parent | 1a30e52142c52010f889113cf4d3669f3461f668 (diff) |
OSX/Scons/OMP: 1. Allow for compile with gnu gcc 4.8.1, 2. fix compiling with sdk > 10.7 by using libgomp dynamic, which includes proper errorhandling vs. static. Before xtra linking to system libstdc++.6.dylib was needed, which then caused incompatibilities
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/scons/config/darwin-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/tools/Blender.py | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py index a87070500dd..5a1069618b9 100644 --- a/build_files/scons/config/darwin-config.py +++ b/build_files/scons/config/darwin-config.py @@ -113,7 +113,7 @@ if XCODE_CUR_VER >= '4.3': ## since version 4.3, XCode and developer dir are bu #Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer ) # if your compiler does not have accurate suffix you may have to enable it by hand ! -if CC[:-2].endswith('4.6'): +if CC[:-2].endswith('4.6') or CC[:-2].endswith('4.8'): WITH_BF_OPENMP = True # multithreading for fluids, cloth, sculpt and smoke else: WITH_BF_OPENMP = False diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index ee2399500d0..f181f290104 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -683,15 +683,23 @@ def AppIt(target=None, source=None, env=None): commands.getoutput(cmd) cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary) commands.getoutput(cmd) - if env['CC'][:-2].endswith('4.6'): # for correct errorhandling with gcc 4.6.x we need the gcc.dylib to link, thus distribute in app-bundle + if env['CC'][:-2].endswith('4.6') or env['CC'][:-2].endswith('4.8'): # for correct errorhandling with gcc 4.6/4.8.x we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle cmd = 'mkdir %s/%s.app/Contents/MacOS/lib'%(installdir, binary) commands.getoutput(cmd) instname = env['BF_CXX'] - cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) + cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgcc commands.getoutput(cmd) - cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary) + cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc commands.getoutput(cmd) - cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) + cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgomp + commands.getoutput(cmd) + cmd = 'install_name_tool -id @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp + commands.getoutput(cmd) + cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc + commands.getoutput(cmd) + cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender ) + commands.getoutput(cmd) + cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender ) commands.getoutput(cmd) # extract copy system python, be sure to update other build systems |