From d23e1f11002d23a9967e1cce5f7b515641d023b4 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Wed, 31 Mar 2021 10:01:42 +0200 Subject: [PATCH] - Fix stack-protector change to not override other CFLAGS options. --- doc/Changelog | 3 +++ makedist.sh | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index e652f3f6d..fd10160fb 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +31 March 2021: Wouter + - Fix stack-protector change to not override other CFLAGS options. + 30 March 2021: George - Disable the use of stack-protector for cross compiled 32-bit windows builds; relates to #444. diff --git a/makedist.sh b/makedist.sh index df44a97a8..d490f4aad 100755 --- a/makedist.sh +++ b/makedist.sh @@ -364,16 +364,16 @@ if [ "$DOWIN" = "yes" ]; then fi echo "$configure"' --enable-debug --enable-static-exe --disable-flto '"$* $cross_flag "$file_flag" "$file2_flag" "$file3_flag"" if test "$W64" = "no"; then - $configure --enable-debug --enable-static-exe --disable-flto $* $cross_flag "$file_flag" "$file2_flag" "$file3_flag" \ + # Disable stack-protector for 32-bit windows builds. + $configure --enable-debug --enable-static-exe --disable-flto $* $cross_flag "$file_flag" "$file2_flag" "$file3_flag" CFLAGS='-O2 -g -fno-stack-protector'\ || error_cleanup "Could not configure" else $configure --enable-debug --enable-static-exe --disable-flto $* $cross_flag \ || error_cleanup "Could not configure" fi info "Calling make" - # Disable stack-protector for 32-bit windows builds. if test "$W64" = "no"; then - make $MINJ CFLAGS='-fno-stack-protector' || error_cleanup "Could not make" + make $MINJ || error_cleanup "Could not make" else make $MINJ || error_cleanup "Could not make" fi @@ -384,16 +384,16 @@ if [ "$DOWIN" = "yes" ]; then cd ../unbound_shared echo "$configure"' --enable-debug --disable-flto '"$* $shared_cross_flag "$file_flag" "$file2_flag" "$file3_flag"" if test "$W64" = "no"; then - $configure --enable-debug --disable-flto $* $shared_cross_flag "$file_flag" "$file2_flag" "$file3_flag" \ + # Disable stack-protector for 32-bit windows builds. + $configure --enable-debug --disable-flto $* $shared_cross_flag "$file_flag" "$file2_flag" "$file3_flag" CFLAGS='-O2 -g -fno-stack-protector'\ || error_cleanup "Could not configure" else $configure --enable-debug --disable-flto $* $shared_cross_flag \ || error_cleanup "Could not configure" fi info "Calling make for DLL" - # Disable stack-protector for 32-bit windows builds. if test "$W64" = "no"; then - make $MINJ CFLAGS='-fno-stack-protector' || error_cleanup "Could not make DLL" + make $MINJ || error_cleanup "Could not make DLL" else make $MINJ || error_cleanup "Could not make DLL" fi -- 2.47.2