Skip to content
Snippets Groups Projects
Commit 5ae062a7 authored by Gregory Maxwell's avatar Gregory Maxwell
Browse files

Completely remove the built-in autotools -fstatck-protector detection.

 On some systems (HPPA+HPUX+GCC) -fstatck-protector was causing failures not
at build or link time but at actual runtime. This is much less reasonable to
detect from autotools. It looks this this really can only safely be a white-
list, and the systems which would be whitelisted often already pick up the
setting from the OS build environment in any case.  It isn't important for
OPUS, we were just using it as belt-and-suspenders security and because it
makes some failure types easier to troubleshoot.
parent 79a6f4d2
No related branches found
No related tags found
No related merge requests found
......@@ -226,31 +226,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
CFLAGS="$saved_CFLAGS $SYMBOL_VISIBILITY"
AC_SUBST(SYMBOL_VISIBILITY)
ac_build_stack_protector=no
if test "x$ac_cv_c_compiler_gnu" = "xyes" && test "x$MINGW32" != "xyes" ; then
AC_ARG_ENABLE(stack-protector,
AS_HELP_STRING([--disable-stack-protector],[Disable compiler stack hardening]),
[
if test "x$enableval" = "xno"; then
ac_build_stack_protector=$enableval
fi
], [
ac_build_stack_protector=yes
])
if test "x$ac_build_stack_protector" = "xyes"; then
if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fstack-protector-all"
AC_MSG_CHECKING([if ${CC} supports -fstack-protector-all])
AC_LINK_IFELSE([AC_LANG_SOURCE([void main(void){char foo;}])],
[ AC_MSG_RESULT([yes])
STACK_PROTECTOR="-fstack-protector-all" ],
AC_MSG_RESULT([no]))
CFLAGS="$saved_CFLAGS $STACK_PROTECTOR"
fi
fi
fi
CFLAGS="$CFLAGS -W"
saved_CFLAGS="$CFLAGS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment