diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/release-build.sh | 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 6 insertions, 3 deletions
diff --git a/tools/release-build.sh b/tools/release-build.sh index a6d10dc..e19f5b7 100755 --- a/tools/release-build.sh +++ b/tools/release-build.sh @@ -50,7 +50,8 @@ CFLAGS="-O2 -g -Wall -fstack-protector-strong -fPIE -fno-plt" # Level 3 adds the bounds checks level 2 could not prove, and needs GCC 12 or # Clang 15. Fall back rather than lose fortification altogether. -if supports "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -O2"; then +if supports "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -O2" +then CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3" else CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" @@ -58,13 +59,15 @@ fi # Without this a large stack frame can step over a guard page rather than # touch it. -if supports "-fstack-clash-protection"; then +if supports "-fstack-clash-protection" +then CFLAGS="$CFLAGS -fstack-clash-protection" fi # The debug info otherwise records the absolute build directory, so the same # sources built in two checkouts would differ. -if supports "-ffile-prefix-map=/x=."; then +if supports "-ffile-prefix-map=/x=." +then CFLAGS="$CFLAGS -ffile-prefix-map=$PWD=." fi |
