From 41183236311664593197be3ec10bf82859117fed Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 23 Oct 2024 12:02:41 -0400 Subject: [PATCH] build: Fix some cflags not making it to libsodium. Disable the libsodium -flto warning a more different way. --- GNUmakefile | 6 +++--- tools/ssl-ios | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 84b3b0bc..5b80d607 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -66,6 +66,7 @@ CFLAGS += \ -g LDFLAGS += \ -Wno-attributes \ + -Wno-aggressive-loop-optimizations \ -flto=auto ANDROID_MIN_SDK_VERSION := 24 @@ -224,8 +225,8 @@ $(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 $(NONMACOS_TARGETS): CFLAGS += -Wno-cast-function-type $(DEADSTRIP_TARGETS): LDFLAGS += -Wl,--gc-sections -$(IOS_TARGETS): CFLAGS += -mios-version-min=9.0 -Ideps/openssl/ios/ios64-xcrun/usr/local/include -$(IOS_TARGETS): LDFLAGS += -mios-version-min=9.0 -Ldeps/openssl/ios/ios64-xcrun/usr/local/lib +$(IOS_TARGETS): CFLAGS += -miphoneos-version-min=9.0 -Ideps/openssl/ios/ios64-xcrun/usr/local/include +$(IOS_TARGETS): LDFLAGS += -miphoneos-version-min=9.0 -Ldeps/openssl/ios/ios64-xcrun/usr/local/lib $(IOSSIM_TARGETS): CFLAGS += -Ideps/openssl/ios/iossimulator-xcrun/usr/local/include $(IOSSIM_TARGETS): LDFLAGS += -Ldeps/openssl/ios/iossimulator-xcrun/usr/local/lib @@ -594,7 +595,6 @@ ifneq ($(UNAME_S),OpenBSD) $(filter-out $(BUILD_DIR)/win%,$(SODIUM_OBJS)): CFLAGS += \ -DHAVE_ALLOCA_H endif -$(SODIUM_OBJS): CFLAGS := $(filter-out -flto,$(CFLAGS)) SQLITE_SOURCES := deps/sqlite/sqlite3.c SQLITE_OBJS := $(call get_objs,SQLITE_SOURCES) diff --git a/tools/ssl-ios b/tools/ssl-ios index 26237d61..86a522ba 100755 --- a/tools/ssl-ios +++ b/tools/ssl-ios @@ -29,7 +29,7 @@ do case $build_target in ios64-xcrun) TRIBLE="arm64-darwin-ios" - OPTIONS="--static -static -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined -mios-version-min=9.0" + OPTIONS="--static -static -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined -miphoneos-version-min=9.0" DESTDIR="/tmp/$BUILD_DIR/arm64-ios" SSL_TARGET="ios64-xcrun" CC=clang