summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorfche <fche>2008-01-29 15:36:16 +0000
committerfche <fche>2008-01-29 15:36:16 +0000
commitbbfd8c1a59001a26cf04c34a97b247fbab9a5bad (patch)
treea5a74ad372b6d9062b1076a5016a5d4bc497b070 /configure.ac
parent564eb0a8ce73a298715c94e02988a29c2064a4ad (diff)
downloadsystemtap-steved-bbfd8c1a59001a26cf04c34a97b247fbab9a5bad.tar.gz
systemtap-steved-bbfd8c1a59001a26cf04c34a97b247fbab9a5bad.tar.xz
systemtap-steved-bbfd8c1a59001a26cf04c34a97b247fbab9a5bad.zip
PR5647: build with -fstack-protector-all by default
2008-01-29 Frank Ch. Eigler <fche@elastic.org> PR 5647 * configure.ac (--enable-ssp): Make default on compilers that support it. * configure: Regenerated.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 10 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 445b592f..d8a7d38c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,13 +66,18 @@ if test "$enable_prologues" = yes; then
AC_DEFINE([ENABLE_PROLOGUES],[],[make -P prologue-searching default])
fi])
-
AC_ARG_ENABLE([ssp],
- [AS_HELP_STRING([--enable-ssp], [enable gcc stack-protector])])
-AS_IF([test "x$enable_ssp" == xyes],
- [CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"
+ [AS_HELP_STRING([--disable-ssp], [disable gcc stack-protector])])
+AS_IF([test "x$enable_ssp" != xno],[
+ save_CFLAGS="$CFLAGS"
+ save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"
- AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.])])
+ CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"
+ AC_COMPILE_IFELSE([int something ();], [
+ AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.])], [
+ AC_MSG_NOTICE([Compiler does not support -fstack-protector-all et al.])
+ CFLAGS="$save_CFLAGS"
+ CXXFLAGS="$save_CXXFLAGS"])])
dnl Handle optional sqlite support. If enabled/disabled by the user,
dnl do the right thing. If not specified by the user, use it if