diff options
author | Dan McGee <dan@archlinux.org> | 2007-11-06 16:07:33 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-11-07 19:03:58 -0600 |
commit | 0e83f12f4aca7abc5131b5292302f4ac9de1b56b (patch) | |
tree | 0fa31e4fc089b045cda0eb2a9247f8834463cc70 | |
parent | 4bbb055cd9938b33bb06c026099df512454f45f3 (diff) | |
download | pacman-0e83f12f4aca7abc5131b5292302f4ac9de1b56b.tar.xz |
Change -fstack-protector flag to -fstack-protector-all
We only use it with --enable-debug, so we might as well go all out and try
to find any attempt of stack smashing.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | acinclude.m4 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 4efb0198..1d66dccd 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -4891,20 +4891,20 @@ AC_DEFUN([GCC_STACK_PROTECT_LIB],[ ]) dnl GCC_STACK_PROTECT_CC -dnl checks -fstack-protector with the C compiler, if it exists then updates +dnl checks -fstack-protector-all with the C compiler, if it exists then updates dnl CFLAGS and defines ENABLE_SSP_CC AC_DEFUN([GCC_STACK_PROTECT_CC],[ AC_LANG_ASSERT(C) if test "X$CC" != "X"; then - AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector], + AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector-all], ssp_cv_cc, [ssp_old_cflags="$CFLAGS" - CFLAGS="$CFLAGS -fstack-protector" + CFLAGS="$CFLAGS -fstack-protector-all" AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no) CFLAGS="$ssp_old_cflags" ]) if test $ssp_cv_cc = yes; then - CFLAGS="$CFLAGS -fstack-protector" + CFLAGS="$CFLAGS -fstack-protector-all" AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) fi fi |