From ae26ef3bdb758ecdd567412cf56c0189fbad74a1 Mon Sep 17 00:00:00 2001 From: Luther Monson Date: Wed, 20 May 2026 20:57:12 -0700 Subject: [PATCH] fix(macos): remove -fno-plt from macOS CFLAGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -fno-plt is an ELF-only flag that has no effect on macOS Mach-O targets — clang emits "argument unused" when it encounters it. Libraries like xz that run -Werror sanity checks during configure promote that warning to a fatal error, breaking the build. --- config/env.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/env.ini b/config/env.ini index acad2523..483ae408 100644 --- a/config/env.ini +++ b/config/env.ini @@ -142,7 +142,7 @@ CXX=${SPC_DEFAULT_CXX} AR=${SPC_DEFAULT_AR} LD=${SPC_DEFAULT_LD} ; default compiler flags, used in CMake toolchain file, openssl and pkg-config build -SPC_DEFAULT_CFLAGS="--target=${MAC_ARCH}-apple-darwin -O3 -fno-plt -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections" +SPC_DEFAULT_CFLAGS="--target=${MAC_ARCH}-apple-darwin -O3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections" SPC_DEFAULT_CXXFLAGS="${SPC_DEFAULT_CFLAGS}" SPC_DEFAULT_LDFLAGS="-Wl,-dead_strip" ; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches