[Xfce4-commits] <xfce4-dev-tools:master> Only use -fstack-protector on Linux systems.

Nick Schermer noreply at xfce.org
Mon Mar 7 21:00:01 CET 2011


Updating branch refs/heads/master
         to 1d71f62e24c95963f84b4d243fa8c07accd87af5 (commit)
       from 9516648eab1302bb7003c2298bb72c7b777b9013 (commit)

commit 1d71f62e24c95963f84b4d243fa8c07accd87af5
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Mar 7 20:58:15 2011 +0100

    Only use -fstack-protector on Linux systems.
    
    The FreeBSD bot has some problems with this flag. Disable
    it on non-linux systems, since it's not that important.

 m4macros/xdt-features.m4 |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/m4macros/xdt-features.m4 b/m4macros/xdt-features.m4
index 063c188..b09a504 100644
--- a/m4macros/xdt-features.m4
+++ b/m4macros/xdt-features.m4
@@ -78,10 +78,13 @@ AC_HELP_STRING([--disable-debug], [Include no debugging support]),
                               -Wmissing-noreturn -Wshadow -Wpointer-arith \
                               -Wcast-align -Wformat-security \
                               -Winit-self -Wmissing-include-dirs -Wundef \
-                              -Wmissing-format-attribute -Wnested-externs \
-                              -fstack-protector"
+                              -Wmissing-format-attribute -Wnested-externs"
     CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
-    
+
+    if test x`uname` = x"Linux"; then
+      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -fstack-protector"
+    fi
+
     if test x"$enable_debug" = x"full"; then
       AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
       xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g3 -Werror"



More information about the Xfce4-commits mailing list