From eb5a7224652ebd83a190dc43e6d125808bab6d07 Mon Sep 17 00:00:00 2001 From: dtucker Date: Sun, 2 Dec 2007 10:02:22 +0000 Subject: [PATCH] - (dtucker) [configure.ac] Enable -fstack-protector-all on systems where gcc supports it. ok djm@ --- ChangeLog | 4 ++++ configure.ac | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 23aa2c7a..b9b6ffc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20071202 + - (dtucker) [configure.ac] Enable -fstack-protector-all on systems where + gcc supports it. ok djm@ + 20071030 - (djm) OpenBSD CVS Sync - djm@cvs.openbsd.org 2007/10/29 23:49:41 diff --git a/configure.ac b/configure.ac index f46f2c28..5772d0a1 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,15 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then *) ;; esac + AC_MSG_CHECKING(if $GCC understands -fstack-protector-all) + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fstack-protector-all" + AC_TRY_COMPILE([], [ int main(void){return 0;} ], + [ AC_MSG_RESULT(yes) ], + [ AC_MSG_RESULT(no) + CFLAGS="$saved_CFLAGS" ] + ) + if test -z "$have_llong_max"; then # retry LLONG_MAX with -std=gnu99, needed on some Linuxes unset ac_cv_have_decl_LLONG_MAX -- 2.45.2