From 2262160df5a5e3045ad24fffae085e24a7986e34 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Mon, 24 Sep 2018 12:28:54 +0200 Subject: [PATCH] Fix ld MIN_SDK for simulator targets ld complains about mixing device and simulator objects in the tvOS target. Reason is that "tvos_version_min" seems to imply a device target, whereas simulator must use "tvos_simulator_version_min" instead. The stupid part of it is that ld displays a warning in iOS: ld: warning: URGENT: -ios_version_min is invalid for architecture x86/x86_64, inferring -ios_simulator_version_min. This will be an error in the future. whereas stops abruptly in tvOS: ld: building for tvOS, but linking in object file built for tvOS Simulator, file 'obj/a_d2i_fp.o' for architecture x86_64 ld should stop and avoid any poorly explained nonsense. --- create-openssl-framework.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/create-openssl-framework.sh b/create-openssl-framework.sh index c61862c..09c5fcd 100755 --- a/create-openssl-framework.sh +++ b/create-openssl-framework.sh @@ -62,10 +62,14 @@ if [ $FWTYPE == "dynamic" ]; then CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk" SDK="${CROSS_TOP}/SDKs/${CROSS_SDK}" - if [[ $PLATFORM == "AppleTV"* ]]; then + if [[ $PLATFORM == AppleTVSimulator* ]]; then + MIN_SDK="-tvos_simulator_version_min 9.0" + elif [[ $PLATFORM == AppleTV* ]]; then MIN_SDK="-tvos_version_min 9.0" elif [[ $PLATFORM == MacOSX* ]]; then MIN_SDK="-macosx_version_min 10.11" + elif [[ $PLATFORM == iPhoneSimulator* ]]; then + MIN_SDK="-ios_simulator_version_min 8.0" else MIN_SDK="-ios_version_min 8.0" fi