shithub: opus

Download patch

ref: 5ae062a759593ef3459e009f4917e99e4b11b44e
parent: 79a6f4d2ada9d2325acb2be6a34c71920bf45992
author: Gregory Maxwell <[email protected]>
date: Wed Aug 29 06:29:24 EDT 2012

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.

--- a/configure.ac
+++ b/configure.ac
@@ -226,31 +226,6 @@
 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"