diff options
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | configure.ac | 17 |
2 files changed, 10 insertions, 14 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-12-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Revert static checking of stack smashing. | ||
| 4 | * configure.ac (WARN_CFLAGS): Omit -Wstack-protector when | ||
| 5 | configured with --enable-gcc-warnings. -Wstack-protector causes | ||
| 6 | diagnostics to be issued on Ubuntu 12.10 x86-64. | ||
| 7 | |||
| 1 | 2012-12-24 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2012-12-24 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | Merge from gnulib, incorporating: | 10 | Merge from gnulib, incorporating: |
diff --git a/configure.ac b/configure.ac index 438993c2861..cc1da6eda28 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -729,23 +729,12 @@ else | |||
| 729 | # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. | 729 | # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. |
| 730 | nw="$nw -Wshadow" | 730 | nw="$nw -Wshadow" |
| 731 | 731 | ||
| 732 | # Emacs's use of alloca inhibits protecting the stack. | ||
| 733 | nw="$nw -Wstack-protector" | ||
| 734 | |||
| 732 | # The following line should be removable at some point. | 735 | # The following line should be removable at some point. |
| 733 | nw="$nw -Wsuggest-attribute=pure" | 736 | nw="$nw -Wsuggest-attribute=pure" |
| 734 | 737 | ||
| 735 | AC_MSG_CHECKING([whether to use -Wstack-protector]) | ||
| 736 | AC_PREPROC_IFELSE( | ||
| 737 | [AC_LANG_PROGRAM( | ||
| 738 | [[#if (1 <= __LONG_MAX__ >> 31 >> 31 \ | ||
| 739 | && 4 < __GNUC__ + (7 < __GNUC_MINOR__ + (2 <= __GNUC_PATCHLEVEL__))) | ||
| 740 | /* OK */ | ||
| 741 | #else | ||
| 742 | #error "Not GCC, or GCC before 4.7.2, or 'long int' has < 64 bits." | ||
| 743 | #endif | ||
| 744 | ]])], | ||
| 745 | [AC_MSG_RESULT(yes)], | ||
| 746 | [AC_MSG_RESULT(no) | ||
| 747 | nw="$nw -Wstack-protector"]) | ||
| 748 | |||
| 749 | gl_MANYWARN_ALL_GCC([ws]) | 738 | gl_MANYWARN_ALL_GCC([ws]) |
| 750 | gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) | 739 | gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) |
| 751 | for w in $ws; do | 740 | for w in $ws; do |