]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Disable the use of stack-protector for cross compiled 32-bit windows builds;
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Tue, 30 Mar 2021 20:15:12 +0000 (22:15 +0200)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Tue, 30 Mar 2021 20:15:12 +0000 (22:15 +0200)
  relates to #444.

doc/Changelog
makedist.sh

index d5412a2a0bd11aa7f10cd0efaffa25043ce38a35..e652f3f6daf728cfd3e897a5e6c36e7b545bce32 100644 (file)
@@ -1,3 +1,7 @@
+30 March 2021: George
+       - Disable the use of stack-protector for cross compiled 32-bit windows
+         builds; relates to #444.
+
 25 March 2021: Wouter
        - Fix #429: Also fix end of transfer for http download of auth zones.
 
index 25cabe1368d620ce072d6509e5416d8cd5fdbd52..df44a97a8a1f6ba1997fd38797956bead2c87e4a 100755 (executable)
@@ -371,7 +371,12 @@ if [ "$DOWIN" = "yes" ]; then
        || error_cleanup "Could not configure"
     fi
     info "Calling make"
-    make $MINJ || error_cleanup "Could not 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"
+       else
+               make $MINJ || error_cleanup "Could not make"
+       fi
     info "Make complete"
 
     if test "`uname`" = "Linux"; then 
@@ -386,7 +391,12 @@ if [ "$DOWIN" = "yes" ]; then
        || error_cleanup "Could not configure"
     fi
     info "Calling make for DLL"
-    make $MINJ || error_cleanup "Could not make 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"
+       else
+               make $MINJ || error_cleanup "Could not make DLL"
+       fi
     info "Make DLL complete"
     cd ../unbound
     fi
@@ -413,7 +423,9 @@ if [ "$DOWIN" = "yes" ]; then
     mkdir libunbound
     cp ../../unbound_shared/unbound.h ../../unbound_shared/.libs/libunbound*.dll ../../unbound_shared/.libs/libunbound.dll.a ../../unbound_shared/.libs/libunbound.a ../../unbound_shared/.libs/libunbound*.def ../../sslsharedinstall/lib/libcrypto.dll.a ../../sslsharedinstall/lib/libssl.dll.a ../../sslsharedinstall/bin/libcrypto*.dll ../../sslsharedinstall/bin/libssl*.dll ../../wxpinstall/bin/libexpat*.dll ../../wxpinstall/lib/libexpat.dll.a libunbound/.
     if test "$W64" = "no"; then
-           cp /usr/i686-w64-mingw32/sys-root/mingw/bin/libssp-0.dll libunbound/.
+       # Disable stack-protector for 32-bit windows builds.
+       # cp /usr/i686-w64-mingw32/sys-root/mingw/bin/libssp-0.dll libunbound/.
+       :
     else
            cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libssp-0.dll libunbound/.
     fi