]> code.delx.au - gnu-emacs/commitdiff
Revert static checking of stack smashing.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 26 Dec 2012 05:41:42 +0000 (21:41 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 26 Dec 2012 05:41:42 +0000 (21:41 -0800)
* configure.ac (WARN_CFLAGS): Omit -Wstack-protector when
configured with --enable-gcc-warnings.  -Wstack-protector causes
diagnostics to be issued on Ubuntu 12.10 x86-64.

ChangeLog
configure.ac

index 2e3c32dacb1189b35dd61c879db1b611e370392d..dbce562664ec6bb6736b3ceca5fdd56b125cbfee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-12-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Revert static checking of stack smashing.
+       * configure.ac (WARN_CFLAGS): Omit -Wstack-protector when
+       configured with --enable-gcc-warnings.  -Wstack-protector causes
+       diagnostics to be issued on Ubuntu 12.10 x86-64.
+
 2012-12-24  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib, incorporating:
index 3c8be79e24c612941ad091a3a3e8a1c4d59cf70f..9d3e872c29c8730c3af5b7a48fa526bbde15d7e4 100644 (file)
@@ -727,23 +727,12 @@ else
   # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
   nw="$nw -Wshadow"
 
+  # Emacs's use of alloca inhibits protecting the stack.
+  nw="$nw -Wstack-protector"
+
   # The following line should be removable at some point.
   nw="$nw -Wsuggest-attribute=pure"
 
-  AC_MSG_CHECKING([whether to use -Wstack-protector])
-  AC_PREPROC_IFELSE(
-    [AC_LANG_PROGRAM(
-       [[#if (1 <= __LONG_MAX__ >> 31 >> 31 \
-           && 4 < __GNUC__ + (7 < __GNUC_MINOR__ + (2 <= __GNUC_PATCHLEVEL__)))
-          /* OK */
-         #else
-          #error "Not GCC, or GCC before 4.7.2, or 'long int' has < 64 bits."
-        #endif
-       ]])],
-    [AC_MSG_RESULT(yes)],
-    [AC_MSG_RESULT(no)
-     nw="$nw -Wstack-protector"])
-
   gl_MANYWARN_ALL_GCC([ws])
   gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
   for w in $ws; do