diff --git a/SConstruct b/SConstruct index 38fbe8d4c..062df47d6 100644 --- a/SConstruct +++ b/SConstruct @@ -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 diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index 99c5a4f99..3d35b0c07 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -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'