better performance and debugging defaults

This commit is contained in:
henderkes
2026-05-06 14:13:33 +07:00
parent aecc227b9a
commit d54e39353d

View File

@@ -94,7 +94,7 @@ SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime
; `native-native` - links against system libc dynamically
; `native-native-musl` - links against musl libc statically
; `native-native-musl -dynamic` - links against musl libc dynamically
SPC_TARGET=${GNU_ARCH}-linux
SPC_TARGET=${GNU_ARCH}-linux-musl
; compiler environments (default value is defined by selected toolchain)
CC=${SPC_DEFAULT_CC}
@@ -102,7 +102,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_C_FLAGS="-fPIC -Os"
SPC_DEFAULT_C_FLAGS="-fPIC -O3 -pipe -fno-plt -fno-semantic-interposition -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections"
SPC_DEFAULT_CXX_FLAGS="${SPC_DEFAULT_C_FLAGS}"
SPC_DEFAULT_LD_FLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,-z,noexecstack -Wl,--gc-sections"
; upx executable path
@@ -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_C_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"
SPC_DEFAULT_C_FLAGS="--target=${MAC_ARCH}-apple-darwin -fPIC -O3 -fno-plt -fno-semantic-interposition -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections"
SPC_DEFAULT_CXX_FLAGS="${SPC_DEFAULT_C_FLAGS}"
SPC_DEFAULT_LD_FLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,-z,noexecstack -Wl,--gc-sections"
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches