mailr15698 - /1.3/sconstruct


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on April 12, 2012 - 14:54:
Author: bugman
Date: Thu Apr 12 14:54:48 2012
New Revision: 15698

URL: http://svn.gna.org/viewcvs/relax?rev=15698&view=rev
Log:
Fix for the building of the relax C modules as universal binaries on Mac OS X.

The linking was not functioning correctly, and the resultant module was build 
only for i386.


Modified:
    1.3/sconstruct

Modified: 1.3/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sconstruct?rev=15698&r1=15697&r2=15698&view=diff
==============================================================================
--- 1.3/sconstruct (original)
+++ 1.3/sconstruct Thu Apr 12 14:54:48 2012
@@ -516,8 +516,8 @@
         else:
             cflags = '-I' + py_include_fullpath + ' -I' + numpy_path
         if env['PLATFORM'] == 'darwin':
-            for arch in ['i386', 'x86_64', 'ppc']:
-                cflags = '%s -arch %s' % (cflags, arch)
+            for arch in ['i386', 'ppc', 'x86_64']:
+                cflags += ' -arch %s' % arch
 
         # Python library path.
         libpath = ''
@@ -529,7 +529,21 @@
 
         # Catch Mac OS X and send the correct command line options to the 
linker (these may become redundant as SCons improves).
         if env['PLATFORM'] == 'darwin':
-            env.Append(LINKFLAGS = ['-bundle', '-bundle_loader', 
py_bin_fullpath, '-dynamic', '-undefined', 'dynamic_lookup'])
+            # The flags.
+            lnflags = [
+                '-bundle',
+                '-bundle_loader', py_bin_fullpath,
+                '-dynamic',
+                '-undefined', 'dynamic_lookup'
+            ]
+
+            # Force all architectures.
+            for arch in ['i386', 'ppc', 'x86_64']:
+                lnflags.append('-arch')
+                lnflags.append(arch)
+
+            # Set up the environment.
+            env.Append(LINKFLAGS = lnflags)
             env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS')
 
         # Shared library prefix and suffix.




Related Messages


Powered by MHonArc, Updated Thu Apr 12 15:40:01 2012