fix liblink to prevent CPU_SUBTYPE_ALL and accept latest flags put in environment

This commit is contained in:
Mathieu Virbel 2011-12-06 15:31:58 +01:00
parent 3adc1e715a
commit 49d05e1381

11
liblink
View file

@ -2,6 +2,7 @@
import sys
import subprocess
from os import environ
libs = [ ]
objects = [ ]
@ -22,7 +23,7 @@ while i < len(sys.argv):
libs.append(opt)
continue
if opt == "-r":
if opt in ("-r", "-pipe", "-no-cpp-precomp"):
continue
if opt in ("--sysroot", "-isysroot", "-framework", "-undefined",
@ -67,9 +68,15 @@ f.write(" ".join(libs))
f.close()
print 'Liblink redirect linking with', objects
subprocess.call([
'%s/usr/bin/ld' % environ.get('DEVROOT'), '-r',
'-o', output + '.o', '-arch', 'armv7'] + objects)
'''
subprocess.call([
"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2",
"-r", "-arch=armv7", "-o", output + ".o" ] + objects)
"-isysroot", environ.get('SDKROOT'),
"-r", "-march=armv7", "-mcpu=arm176jzf", "-mcpu=cortex-a8", "-o", output + ".o" ] + objects)
'''