build: Support Xcode 16.2 on Linux, including cross-compiling OpenSSL.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 22m11s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 22m11s
This commit is contained in:
parent
2dd32cdce2
commit
5e24d4f322
35
GNUmakefile
35
GNUmakefile
@ -238,7 +238,8 @@ $(IOS_TARGETS): CC = xcrun --sdk iphoneos clang -isysroot $(IOS_SYSROOT) -arch a
|
|||||||
$(IOSSIM_TARGETS): IOSSIM_SYSROOT := $(shell xcrun --sdk iphonesimulator --show-sdk-path)
|
$(IOSSIM_TARGETS): IOSSIM_SYSROOT := $(shell xcrun --sdk iphonesimulator --show-sdk-path)
|
||||||
$(IOSSIM_TARGETS): CC = xcrun --sdk iphonesimulator clang -isysroot $(IOSSIM_SYSROOT) -arch x86_64
|
$(IOSSIM_TARGETS): CC = xcrun --sdk iphonesimulator clang -isysroot $(IOSSIM_SYSROOT) -arch x86_64
|
||||||
else ifeq ($(UNAME_S),Linux)
|
else ifeq ($(UNAME_S),Linux)
|
||||||
$(IOS_TARGETS): IOS_SYSROOT := deps/iPhoneOS17.0.sdk
|
$(IOS_TARGETS): CFLAGS += -isysroot deps/ios_toolchain/target/SDKs/iPhoneOS18.2.sdk -arch arm64
|
||||||
|
$(IOS_TARGETS): LDFLAGS += -isysroot deps/ios_toolchain/target/SDKs/iPhoneOS18.2.sdk
|
||||||
$(IOS_TARGETS): CC = PATH=$$PATH:deps/ios_toolchain/target/bin deps/ios_toolchain/target/bin/arm-apple-darwin11-clang
|
$(IOS_TARGETS): CC = PATH=$$PATH:deps/ios_toolchain/target/bin deps/ios_toolchain/target/bin/arm-apple-darwin11-clang
|
||||||
endif
|
endif
|
||||||
$(ANDROID_X86_64_TARGETS): ANDROID_NDK_TARGET_TRIPLE := x86_64-linux-android
|
$(ANDROID_X86_64_TARGETS): ANDROID_NDK_TARGET_TRIPLE := x86_64-linux-android
|
||||||
@ -261,8 +262,15 @@ $(ANDROID_X86_64_TARGETS): CFLAGS += -Ideps/openssl/android/x86_64/usr/local/inc
|
|||||||
$(ANDROID_X86_64_TARGETS): LDFLAGS += -Ldeps/openssl/android/x86_64/usr/local/lib
|
$(ANDROID_X86_64_TARGETS): LDFLAGS += -Ldeps/openssl/android/x86_64/usr/local/lib
|
||||||
$(NONMACOS_TARGETS): CFLAGS += -Wno-cast-function-type
|
$(NONMACOS_TARGETS): CFLAGS += -Wno-cast-function-type
|
||||||
$(DEADSTRIP_TARGETS): LDFLAGS += -Wl,--gc-sections
|
$(DEADSTRIP_TARGETS): LDFLAGS += -Wl,--gc-sections
|
||||||
$(IOS_TARGETS): CFLAGS += -miphoneos-version-min=9.0 -Ideps/openssl/ios/ios64-xcrun/usr/local/include
|
$(IOS_TARGETS): CFLAGS += -miphoneos-version-min=9.0
|
||||||
$(IOS_TARGETS): LDFLAGS += -miphoneos-version-min=9.0 -Ldeps/openssl/ios/ios64-xcrun/usr/local/lib
|
$(IOS_TARGETS): LDFLAGS += -miphoneos-version-min=9.0
|
||||||
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
$(IOS_TARGETS): CFLAGS += -Ideps/openssl/ios/ios64-xcrun/usr/local/include
|
||||||
|
$(IOS_TARGETS): LDFLAGS += -Ldeps/openssl/ios/ios64-xcrun/usr/local/lib
|
||||||
|
else
|
||||||
|
$(IOS_TARGETS): CFLAGS += -Ideps/openssl/$(UNAME_S)/ios64-cross/usr/local/include
|
||||||
|
$(IOS_TARGETS): LDFLAGS += -Ldeps/openssl/$(UNAME_S)/ios64-cross/usr/local/lib
|
||||||
|
endif
|
||||||
$(IOSSIM_TARGETS): CFLAGS += -Ideps/openssl/ios/iossimulator-xcrun/usr/local/include
|
$(IOSSIM_TARGETS): CFLAGS += -Ideps/openssl/ios/iossimulator-xcrun/usr/local/include
|
||||||
$(IOSSIM_TARGETS): LDFLAGS += -Ldeps/openssl/ios/iossimulator-xcrun/usr/local/lib
|
$(IOSSIM_TARGETS): LDFLAGS += -Ldeps/openssl/ios/iossimulator-xcrun/usr/local/lib
|
||||||
$(LINUX_TARGETS) $(MACOS_TARGETS): CFLAGS += -Ideps/openssl/$(UNAME_S)/$(UNAME_M)/usr/local/include
|
$(LINUX_TARGETS) $(MACOS_TARGETS): CFLAGS += -Ideps/openssl/$(UNAME_S)/$(UNAME_M)/usr/local/include
|
||||||
@ -1136,21 +1144,36 @@ $(filter $(BUILD_DIR)/android%,$(APP_OBJS)): | $(ANDROID_DEPS)
|
|||||||
ifeq ($(UNAME_S),Linux)
|
ifeq ($(UNAME_S),Linux)
|
||||||
LOCAL_DEPS := deps/openssl/$(UNAME_S)/$(UNAME_M)/usr/local/lib/libssl.a
|
LOCAL_DEPS := deps/openssl/$(UNAME_S)/$(UNAME_M)/usr/local/lib/libssl.a
|
||||||
$(LOCAL_DEPS):
|
$(LOCAL_DEPS):
|
||||||
+@tools/ssl-local
|
+@OPTIONS=-flto tools/ssl-local
|
||||||
$(filter $(BUILD_DIR)/debug/%,$(APP_OBJS)) $(filter $(BUILD_DIR)/release/%,$(APP_OBJS)): | $(LOCAL_DEPS)
|
$(filter $(BUILD_DIR)/debug/%,$(APP_OBJS)) $(filter $(BUILD_DIR)/release/%,$(APP_OBJS)): | $(LOCAL_DEPS)
|
||||||
|
|
||||||
ifeq ($(HAVE_CROSS_AARCH64),1)
|
ifeq ($(HAVE_CROSS_AARCH64),1)
|
||||||
LOCAL_DEPS := deps/openssl/$(UNAME_S)/aarch64/usr/local/lib/libssl.a
|
LOCAL_DEPS := deps/openssl/$(UNAME_S)/aarch64/usr/local/lib/libssl.a
|
||||||
$(LOCAL_DEPS):
|
$(LOCAL_DEPS):
|
||||||
+@OPTIONS=--cross-compile-prefix=aarch64-linux-gnu- BUILD_TARGET=aarch64 tools/ssl-local
|
+@OPTIONS="--cross-compile-prefix=aarch64-linux-gnu- -flto" BUILD_TARGET=aarch64 tools/ssl-local
|
||||||
$(filter $(BUILD_DIR)/armdebug/%,$(APP_OBJS)) $(filter $(BUILD_DIR)/armrelease/%,$(APP_OBJS)): | $(LOCAL_DEPS)
|
$(filter $(BUILD_DIR)/armdebug/%,$(APP_OBJS)) $(filter $(BUILD_DIR)/armrelease/%,$(APP_OBJS)): | $(LOCAL_DEPS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(HAVE_LINUX_IOS),1)
|
||||||
|
LOCAL_DEPS := deps/openssl/$(UNAME_S)/ios64-cross/usr/local/lib/libssl.a
|
||||||
|
$(LOCAL_DEPS):
|
||||||
|
+@PATH=deps/ios_toolchain/target/bin:$$PATH \
|
||||||
|
BUILD_TARGET=ios64-cross \
|
||||||
|
SSL_TARGET=ios64-cross \
|
||||||
|
CROSS_COMPILE=../../deps/ios_toolchain/target/bin/arm-apple-darwin11- \
|
||||||
|
CROSS_TOP=../../deps/ios_toolchain/target \
|
||||||
|
CROSS_SDK=iPhoneOS18.2.sdk \
|
||||||
|
CC=clang \
|
||||||
|
OPTIONS=-miphoneos-version-min=9.0 \
|
||||||
|
tools/ssl-local
|
||||||
|
$(filter $(BUILD_DIR)/ios%,$(APP_OBJS)): | $(LOCAL_DEPS)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
LOCAL_DEPS := deps/openssl/$(UNAME_S)/$(UNAME_M)/usr/local/lib/libssl.a
|
LOCAL_DEPS := deps/openssl/$(UNAME_S)/$(UNAME_M)/usr/local/lib/libssl.a
|
||||||
$(LOCAL_DEPS):
|
$(LOCAL_DEPS):
|
||||||
+@tools/ssl-local
|
+@OPTIONS=-flto tools/ssl-local
|
||||||
$(filter $(BUILD_DIR)/macosdebug/%,$(APP_OBJS)) $(filter $(BUILD_DIR)/macosrelease/%,$(APP_OBJS)): | $(LOCAL_DEPS)
|
$(filter $(BUILD_DIR)/macosdebug/%,$(APP_OBJS)) $(filter $(BUILD_DIR)/macosrelease/%,$(APP_OBJS)): | $(LOCAL_DEPS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -6,8 +6,10 @@ if [[ -z $BUILD_TARGET ]]; then
|
|||||||
WORK_DIR=out/openssl-local
|
WORK_DIR=out/openssl-local
|
||||||
else
|
else
|
||||||
WORK_DIR=out/openssl-$BUILD_TARGET
|
WORK_DIR=out/openssl-$BUILD_TARGET
|
||||||
|
if [[ -z $SSL_TARGET ]]; then
|
||||||
SSL_TARGET=linux-$BUILD_TARGET
|
SSL_TARGET=linux-$BUILD_TARGET
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf $WORK_DIR
|
rm -rf $WORK_DIR
|
||||||
cp -aRf deps/openssl_src/ $WORK_DIR
|
cp -aRf deps/openssl_src/ $WORK_DIR
|
||||||
@ -72,8 +74,7 @@ no-zlib
|
|||||||
-Os
|
-Os
|
||||||
-DOPENSSL_SMALL_FOOTPRINT
|
-DOPENSSL_SMALL_FOOTPRINT
|
||||||
-ffunction-sections
|
-ffunction-sections
|
||||||
-fdata-sections
|
-fdata-sections"
|
||||||
-flto"
|
|
||||||
pwd
|
pwd
|
||||||
echo "./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS" && \
|
echo "./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS" && \
|
||||||
./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS && \
|
./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS && \
|
||||||
|
Loading…
Reference in New Issue
Block a user