Fix emerg-shutdown gcc build, remove AddressSanitizer from hardening options since it is incompatible with static builds

This commit is contained in:
Aaron Rainbolt 2025-09-28 15:05:21 -05:00
parent 7e016b5632
commit 60f8153f64
No known key found for this signature in database
GPG key ID: A709160D73C79109

View file

@ -38,7 +38,7 @@ gcc_hardening_options=(
"-Wcast-align=strict" "-Wjump-misses-init" "-Wlogical-op" "-U_FORTIFY_SOURCE"
"-D_FORTIFY_SOURCE=3" "-fstack-clash-protection" "-fstack-protector-all"
"-fno-delete-null-pointer-checks" "-fno-strict-aliasing"
"-fsanitize=address,undefined" "-fno-sanitize-recover=all"
"-fsanitize=undefined" "-fno-sanitize-recover=all"
"-fstrict-flex-arrays=3" "-ftrivial-auto-var-init=pattern" "-fPIE"
)
@ -78,7 +78,7 @@ else
## Build the actual emerg-shutdown executable
if [ ! -f '/run/emerg-shutdown' ]; then
gcc \
-g
-g \
/usr/src/security-misc/emerg-shutdown.c \
-o \
/run/emerg-shutdown \