From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Patrick Meyer Date: Thu, 28 Apr 2022 01:50:11 +0000 Subject: [PATCH] Disable SSP Co-Authored-By: Yonatan Goldschmidt --- configure | 46 ---------------------------------------------- configure.ac | 17 +---------------- 2 files changed, 1 insertion(+), 62 deletions(-) diff --git a/configure b/configure index 8374714..8c9eb9a 100755 --- a/configure +++ b/configure @@ -3381,53 +3381,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # non-static - # stack protector. -strong is good but only in gcc 4.9 or later - OLDCFLAGS="$CFLAGS" - TESTFLAGS="-fstack-protector-strong" - CFLAGS="$CFLAGS $TESTFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Setting $TESTFLAGS" >&5 -$as_echo "$as_me: Setting $TESTFLAGS" >&6;} -else - - CFLAGS="$OLDCFLAGS" - TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4" - CFLAGS="$CFLAGS $TESTFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Setting $TESTFLAGS" >&5 -$as_echo "$as_me: Setting $TESTFLAGS" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Not setting $TESTFLAGS" >&5 -$as_echo "$as_me: Not setting $TESTFLAGS" >&6;}; CFLAGS="$OLDCFLAGS" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # FORTIFY_SOURCE { OLDFLAGS="$CFLAGS" diff --git a/configure.ac b/configure.ac index 6a19479..28cd987 100644 --- a/configure.ac +++ b/configure.ac @@ -103,22 +103,7 @@ if test "$hardenbuild" -eq 1; then [AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ] ) fi # non-static - # stack protector. -strong is good but only in gcc 4.9 or later - OLDCFLAGS="$CFLAGS" - TESTFLAGS="-fstack-protector-strong" - CFLAGS="$CFLAGS $TESTFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], - [AC_MSG_NOTICE([Setting $TESTFLAGS])], - [ - CFLAGS="$OLDCFLAGS" - TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4" - CFLAGS="$CFLAGS $TESTFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], - [AC_MSG_NOTICE([Setting $TESTFLAGS])], - [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDCFLAGS" ] - ) - ] - ) + # FORTIFY_SOURCE DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2])