diff options
author | fche <fche> | 2008-01-12 18:31:00 +0000 |
---|---|---|
committer | fche <fche> | 2008-01-12 18:31:00 +0000 |
commit | e6c086bb348b85d8008f61fa0b3d50a1d3e380cf (patch) | |
tree | b76bcd3e4d62344a5cc8a04dfbe036b4283f81c0 | |
parent | 8eab8950e173632eaf36bd69365ef51a6804fc84 (diff) | |
download | systemtap-steved-e6c086bb348b85d8008f61fa0b3d50a1d3e380cf.tar.gz systemtap-steved-e6c086bb348b85d8008f61fa0b3d50a1d3e380cf.tar.xz systemtap-steved-e6c086bb348b85d8008f61fa0b3d50a1d3e380cf.zip |
add --enable-ssp configure option so developers can build like fedora does
2008-01-12 Frank Ch. Eigler <fche@elastic.org>
PR 5603.
* configure.ac: Add "--enable-ssp" to select -fstack-protector-all
and similar runtime checking directives.
* configure: Regenerated.
-rw-r--r-- | ChangeLog | 7 | ||||
-rwxr-xr-x | configure | 17 | ||||
-rw-r--r-- | configure.ac | 10 |
3 files changed, 34 insertions, 0 deletions
@@ -1,3 +1,10 @@ +2008-01-12 Frank Ch. Eigler <fche@elastic.org> + + PR 5603. + * configure.ac: Add "--enable-ssp" to select -fstack-protector-all + and similar runtime checking directives. + * configure: Regenerated. + 2008-01-09 David Smith <dsmith@redhat.com> * systemtap.spec.in: Since "make check" was removed @@ -1312,6 +1312,7 @@ Optional Features: --enable-dependency-tracking do not reject slow dependency extractors --enable-perfmon enable perfmon support (default is disabled) --enable-prologues make -P prologue-searching default + --enable-ssp enable gcc stack-protector Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -5822,6 +5823,8 @@ fi + + # Check whether --enable-perfmon was given. if test "${enable_perfmon+set}" = set; then enableval=$enable_perfmon; perfmon_support=$enableval @@ -6033,6 +6036,20 @@ sqlite3_LIBS="$LIBS" LIBS="$SAVE_LIBS" + +# Check whether --enable-ssp was given. +if test "${enable_ssp+set}" = set; then + enableval=$enable_ssp; +fi + +if test "x$enable_ssp" == xyes; then + CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + { echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 +echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} +fi + + build_elfutils=no # Check whether --with-elfutils was given. diff --git a/configure.ac b/configure.ac index d2a150b0..522af8d7 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,8 @@ AC_PROG_MAKE_SET AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) + + dnl enable option to generate code for using perfmon AC_ARG_ENABLE(perfmon, [ --enable-perfmon enable perfmon support (default is disabled)], @@ -81,6 +83,14 @@ sqlite3_LIBS="$LIBS" AC_SUBST(sqlite3_LIBS) LIBS="$SAVE_LIBS" + +AC_ARG_ENABLE([ssp], + [AC_HELP_STRING([--enable-ssp], [enable gcc stack-protector])]) +AS_IF([test "x$enable_ssp" == xyes], + [CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.])]) + build_elfutils=no AC_ARG_WITH([elfutils], AC_HELP_STRING([--with-elfutils=DIRECTORY], |