From b35556b3794c8198eb3dc9a5118093cd94e4cac2 Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Sat, 12 Jan 2019 16:19:21 -0500 Subject: [PATCH 1/2] increase minapi, remove armv7 (32-bit arm), link to arm64 by default and use new-style linker flags --- recipes/libffi/__init__.py | 2 +- toolchain.py | 30 +++++++++++++++--------------- tools/biglink | 2 +- tools/liblink | 10 ++++++++-- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/recipes/libffi/__init__.py b/recipes/libffi/__init__.py index 98c64e1..0147f75 100644 --- a/recipes/libffi/__init__.py +++ b/recipes/libffi/__init__.py @@ -11,7 +11,7 @@ class LibffiRecipe(Recipe): include_per_arch = True include_dir = "build_{arch.sdk}-{arch.arch}/include" include_name = "ffi" - archs = ["x86_64", "armv7", "arm64"] + archs = ["x86_64", "arm64"] def prebuild_arch(self, arch): if self.has_marker("patched"): diff --git a/toolchain.py b/toolchain.py index 7b51445..c4c8932 100755 --- a/toolchain.py +++ b/toolchain.py @@ -226,35 +226,35 @@ class Arch(object): -class ArchSimulator(Arch): - sdk = "iphonesimulator" - arch = "i386" - triple = "i386-apple-darwin11" - version_min = "-miphoneos-version-min=6.0.0" - sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip() +#class ArchSimulator(Arch): +# sdk = "iphonesimulator" +# arch = "i386" +# triple = "i386-apple-darwin11" +# version_min = "-miphoneos-version-min=6.0.0" +# sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip() class Arch64Simulator(Arch): sdk = "iphonesimulator" arch = "x86_64" triple = "x86_64-apple-darwin13" - version_min = "-miphoneos-version-min=7.0" + version_min = "-miphoneos-version-min=8.0" sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip() -class ArchIOS(Arch): - sdk = "iphoneos" - arch = "armv7" - triple = "arm-apple-darwin11" - version_min = "-miphoneos-version-min=6.0.0" - sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip() +#class ArchIOS(Arch): +# sdk = "iphoneos" +# arch = "armv7" +# triple = "arm-apple-darwin11" +# version_min = "-miphoneos-version-min=6.0.0" +# sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip() class Arch64IOS(Arch): sdk = "iphoneos" arch = "arm64" triple = "aarch64-apple-darwin13" - version_min = "-miphoneos-version-min=7.0" + version_min = "-miphoneos-version-min=8.0" sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip() @@ -359,7 +359,7 @@ class Context(object): self.archs = ( # ArchSimulator(self), Arch64Simulator(self), - ArchIOS(self), + # ArchIOS(self), Arch64IOS(self)) # path to some tools diff --git a/tools/biglink b/tools/biglink index 35405ac..3ec5859 100755 --- a/tools/biglink +++ b/tools/biglink @@ -20,5 +20,5 @@ for fn in sofiles: unique_args = ' '.join(x for x in sorted(set(args)) if x.endswith('.so.o')) print('Biglink create %s library' % sys.argv[1]) cmd = "ar -q %s %s" % (sys.argv[1], unique_args) -print(cmd) +print('Binlinking: {}'.format(cmd)) subprocess.Popen(cmd, shell=True).communicate() diff --git a/tools/liblink b/tools/liblink index 094cc20..8ce90e9 100755 --- a/tools/liblink +++ b/tools/liblink @@ -75,5 +75,11 @@ f.close() print('Liblink redirect linking with', objects) ld = environ.get('ARM_LD') -arch = environ.get('ARCH', 'armv7') -subprocess.call([ld, '-r', '-o', output + '.o', '-ios_version_min', '7.0', '-arch', arch] + objects) +arch = environ.get('ARCH', 'arm64') +if 'arm' in arch: + min_version_flag = '-ios_version_min' +else: + min_version_flag = '-ios_simulator_version_min' +call = [ld, '-r', '-o', output + '.o', min_version_flag, '8.0', '-arch', arch] + objects +print("Linking: {}".format(" ".join(call))) +subprocess.call(call) From 405af9f828fd51c7830a8d5c5217c0271fce233f Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Sun, 13 Jan 2019 21:02:26 -0500 Subject: [PATCH 2/2] remove these, don't just comment out --- toolchain.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/toolchain.py b/toolchain.py index c4c8932..52cf75c 100755 --- a/toolchain.py +++ b/toolchain.py @@ -225,15 +225,6 @@ class Arch(object): return env - -#class ArchSimulator(Arch): -# sdk = "iphonesimulator" -# arch = "i386" -# triple = "i386-apple-darwin11" -# version_min = "-miphoneos-version-min=6.0.0" -# sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip() - - class Arch64Simulator(Arch): sdk = "iphonesimulator" arch = "x86_64" @@ -242,14 +233,6 @@ class Arch64Simulator(Arch): sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip() -#class ArchIOS(Arch): -# sdk = "iphoneos" -# arch = "armv7" -# triple = "arm-apple-darwin11" -# version_min = "-miphoneos-version-min=6.0.0" -# sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip() - - class Arch64IOS(Arch): sdk = "iphoneos" arch = "arm64" @@ -357,9 +340,7 @@ class Context(object): self.install_dir = "{}/dist/root".format(self.root_dir) self.include_dir = "{}/dist/include".format(self.root_dir) self.archs = ( - # ArchSimulator(self), Arch64Simulator(self), - # ArchIOS(self), Arch64IOS(self)) # path to some tools