SXEmacs v22.1.16 is released!
[sxemacs] / m4 / sxe-compiler.m4
index 8c7c566..af61b92 100644 (file)
@@ -1607,16 +1607,18 @@ extern void f(void*restrict[]);
 AC_DEFUN([SXE_STACK_FLAGS], [dnl
        ## actually this belongs to error-checking stuff
        SXE_CHECK_COMPILER_FLAGS([-fstack-protector])
-       ## check if ssp is actually working
        if test "${sxe_cv_c_flags__fstack_protector}" = "yes"; then
-               ## just check for ssp in this case
-               AC_CHECK_LIB([ssp], [__stack_chk_guard])
-       fi
-       ## final thing
-       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"
+               case "$opsys" in
+               freebsd)
+                       diagflags="${diagflags} -fstack-protector"
+                       ;;
+               *)
+                       AC_CHECK_LIB([ssp], [__stack_chk_guard])
+                       if test "${ac_cv_lib_ssp___stack_chk_guard}" = "yes"; then
+                               diagflags="${diagflags} -fstack-protector"
+                       fi
+                       ;;
+               esac
        fi
 ])dnl SXE_STACK_FLAGS