]> git.meshlink.io Git - catta/commitdiff
Disable SSP on archs that don't support it. (Patch idead from Sjoerd Simons; Closes...
authorLennart Poettering <lennart@poettering.net>
Tue, 8 May 2007 22:36:38 +0000 (22:36 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 8 May 2007 22:36:38 +0000 (22:36 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1462 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

common/gcc_stack_protect.m4
configure.ac

index 13c5e0a48a2ea8c653636dc4afba79064ac39e30..224684959dc86acb755dc660e9b7426b729ffd14 100644 (file)
@@ -57,7 +57,7 @@ AC_DEFUN([GCC_STACK_PROTECT_CC],[
     AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector],
       ssp_cv_cc,
       [ssp_old_cflags="$CFLAGS"
-       CFLAGS="$CFLAGS -fstack-protector"
+       CFLAGS="$CFLAGS -fstack-protector -Werror"
        AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no)
        CFLAGS="$ssp_old_cflags"
       ])
@@ -74,7 +74,7 @@ AC_DEFUN([GCC_STACK_PROTECT_CXX],[
     AC_CACHE_CHECK([whether ${CXX} accepts -fstack-protector],
       ssp_cv_cxx,
       [ssp_old_cxxflags="$CXXFLAGS"
-       CXXFLAGS="$CXXFLAGS -fstack-protector"
+       CXXFLAGS="$CXXFLAGS -fstack-protector -Werror"
        AC_TRY_COMPILE(,, ssp_cv_cxx=yes, ssp_cv_cxx=no)
        CXXFLAGS="$ssp_old_cxxflags"
       ])
index 2286b8090bbdf102229f9d712e099fd037bfd6b2..cbfa2b97aa09eaea8aaacbc5e33b129c951a16eb 100644 (file)
@@ -84,7 +84,7 @@ if test x"$enable_ssp" = x"yes"; then
     AC_MSG_CHECKING([whether stack-smashing protection is available])
     ssp_old_cflags="$CFLAGS"
     ssp_old_ldflags="$LDFLAGS"
-    CFLAGS="$CFLAGS -fstack-protector-all -fPIC"
+    CFLAGS="$CFLAGS -Werror -fstack-protector-all -fPIC"
     LDFLAGS="$LDFLAGS -Wl,-z,defs"
     cat confdefs.h > conftest.c
     cat >>conftest.c <<_ACEOF