From 707b4990a6afa45d1f3431a15633c499cbfd77e8 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 24 Dec 2024 15:01:09 -0500 Subject: [PATCH] build: Not all the toolchains support -Oz. Oh well. --- GNUmakefile | 8 +++++--- tools/ssl-ios | 4 ++-- tools/ssl-local | 2 +- tools/ssl-mingw64 | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 5b3cb155..07d23f64 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -211,9 +211,11 @@ $(DEBUG_TARGETS): CFLAGS += -DDEBUG -Og $(DEBUG_TARGETS): LDFLAGS += -Og $(RELEASE_TARGETS): CFLAGS += \ -DNDEBUG \ - -flto \ - -Oz -$(RELEASE_TARGETS): LDFLAGS += -Oz + -flto +$(ANDROID_RELEASE_TARGETS): CFLAGS += -Oz +$(ANDROID_RELEASE_TARGETS): LDFLAGS += -Oz +$(NONANDROID_RELEASE_TARGETS): CFLAGS += -Os +$(NONANDROID_RELEASE_TARGETS): LDFLAGS += -Os $(WINDOWS_TARGETS): CC = x86_64-w64-mingw32-gcc-win32 $(WINDOWS_TARGETS): AS = $(CC) $(WINDOWS_TARGETS): CFLAGS += \ diff --git a/tools/ssl-ios b/tools/ssl-ios index 0000929d..a6184ebf 100755 --- a/tools/ssl-ios +++ b/tools/ssl-ios @@ -29,14 +29,14 @@ do case $build_target in ios64-xcrun) TRIBLE="arm64-darwin-ios" - OPTIONS="--static -static -Oz -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined -miphoneos-version-min=9.0" + OPTIONS="--static -static -Os -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 ;; iossimulator-xcrun) TRIBLE="x86_64-darwin-ios" - OPTIONS="--static -static -Oz -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined" + OPTIONS="--static -static -Os -ffunction-sections -fdata-sections -fPIC -Wno-macro-redefined" DESTDIR="/tmp/$BUILD_DIR/x86_64-iossim" SSL_TARGET="iossimulator-xcrun" CC=clang diff --git a/tools/ssl-local b/tools/ssl-local index 3d2a10e9..299d5b2f 100755 --- a/tools/ssl-local +++ b/tools/ssl-local @@ -69,7 +69,7 @@ no-uplink no-whirlpool no-weak-ssl-ciphers no-zlib --Oz +-Os -DOPENSSL_SMALL_FOOTPRINT -ffunction-sections -fdata-sections diff --git a/tools/ssl-mingw64 b/tools/ssl-mingw64 index 8c739805..d75c6545 100755 --- a/tools/ssl-mingw64 +++ b/tools/ssl-mingw64 @@ -56,7 +56,7 @@ build_the_thing() { no-uplink no-weak-ssl-ciphers no-zlib - -Oz + -Os -ffunction-sections -fdata-sections -flto