From d7a0de0519e016c267cf7fe4fdb6a3579778cd77 Mon Sep 17 00:00:00 2001 From: Nelson Ferreira Date: Wed, 22 Feb 2012 17:49:38 -0500 Subject: [PATCH] Better stack-protector behavior in FreeBSD * m4/sxe-compiler.m4 (SXE_STACK_FLAGS): Forcefully disable stack-protector on freebsd and output warning message.. Signed-off-by: Nelson Ferreira --- m4/sxe-compiler.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/m4/sxe-compiler.m4 b/m4/sxe-compiler.m4 index 8c7c566..49d0137 100644 --- a/m4/sxe-compiler.m4 +++ b/m4/sxe-compiler.m4 @@ -1616,7 +1616,11 @@ AC_DEFUN([SXE_STACK_FLAGS], [dnl if test "${sxe_cv_c_flags__fstack_protector}" = "yes" -a \ "${ac_cv_lib_ssp___stack_chk_guard}" = "yes"; then ## only if ssp is guaranteed to work - diagflags="${diagflags} -fstack-protector" + if test "$opsys" = "freebsd"; then + AS_MESSAGE("Disabling -fstack-protector because it is known to be broken in FreeBSD. Contact the sxemacs-devel@sxemacs.org if you disagree...") + else + diagflags="${diagflags} -fstack-protector" + fi fi ])dnl SXE_STACK_FLAGS -- 2.34.1