Compiling: Make sure that libelf is also compiled for 64bit on OS X.
authorAli Saidi <saidi@eecs.umich.edu>
Mon, 19 Nov 2007 23:23:43 +0000 (18:23 -0500)
committerAli Saidi <saidi@eecs.umich.edu>
Mon, 19 Nov 2007 23:23:43 +0000 (18:23 -0500)
--HG--
extra : convert_revision : 9d4f7064e0aa4b6cc6a5bcf0f6fb5289047cd143

SConstruct
ext/libelf/SConscript

index 38fbe8d4cedbac782a172c3920ce311564d9ae20..062df47d6db3d4b59728545cd2dcbdc4733539d6 100644 (file)
@@ -346,6 +346,7 @@ try:
             env.Append(CFLAGS='-arch x86_64')
             env.Append(LINKFLAGS='-arch x86_64')
             env.Append(ASFLAGS='-arch x86_64')
+            env['OSX64bit'] = True
 except:
     pass
 
index 99c5a4f9959e2dce38db55e8c384e2ae10eaddc8..3d35b0c07e1c6a939a180edd74757ce6caba293b 100644 (file)
@@ -88,11 +88,16 @@ ElfFile('libelf_fsize.c')
 ElfFile('libelf_msize.c')
 
 m4env = Environment(ENV=os.environ)
+
 if env.get('CC'):
     m4env['CC'] = env['CC']
 if env.get('CXX'):
     m4env['CXX'] = env['CXX']
 
+if env.get('OSX64bit'):
+    m4env.Append(CFLAGS='-arch x86_64')
+    m4env.Append(LINKFLAGS='-arch x86_64')
+
 # If we have gm4 use it
 if m4env.Detect('gm4'):
     m4env['M4'] = 'gm4'