aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-09-01 11:54:38 -0700
committerPaul Eggert2012-09-01 11:54:38 -0700
commit2d3800d2cf34188b0b3ee30012d09f3426b9ae01 (patch)
treec9a2790bfe06c2a952a1c0d4b791649b3dbe3783
parent78dd6ab19818ddbd6995e58b6eccd3e19899aba1 (diff)
downloademacs-2d3800d2cf34188b0b3ee30012d09f3426b9ae01.tar.gz
emacs-2d3800d2cf34188b0b3ee30012d09f3426b9ae01.zip
* configure.ac (_FORTIFY_SOURCE): Define only when optimizing.
This ports to glibc 2.15 or later, when configured with --enable-gcc-warnings. See Eric Blake in <http://lists.gnu.org/archive/html/bug-grep/2012-09/msg00000.html>.
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac9
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e93b8313e7..cf4506f0c77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12012-09-01 Paul Eggert <eggert@cs.ucla.edu>
2
3 * configure.ac (_FORTIFY_SOURCE): Define only when optimizing.
4 This ports to glibc 2.15 or later, when configured with
5 --enable-gcc-warnings. See Eric Blake in
6 <http://lists.gnu.org/archive/html/bug-grep/2012-09/msg00000.html>.
7
12012-09-01 Daniel Colascione <dan.colascione@gmail.com> 82012-09-01 Daniel Colascione <dan.colascione@gmail.com>
2 9
3 * configure.ac: Introduce term_header variable, which holds the 10 * configure.ac: Introduce term_header variable, which holds the
diff --git a/configure.ac b/configure.ac
index d16113bf919..43686361d07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -737,8 +737,13 @@ else
737 gl_WARN_ADD([-funit-at-a-time]) 737 gl_WARN_ADD([-funit-at-a-time])
738 738
739 AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) 739 AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
740 AC_DEFINE([_FORTIFY_SOURCE], [2], 740 AH_VERBATIM([FORTIFY_SOURCE],
741 [enable compile-time and run-time bounds-checking, and some warnings]) 741 [/* Enable compile-time and run-time bounds-checking, and some warnings,
742 without upsetting glibc 2.15+. */
743 #if defined __OPTIMIZE__ && __OPTIMIZE__
744 # define _FORTIFY_SOURCE 2
745 #endif
746 ])
742 AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) 747 AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
743 748
744 # We use a slightly smaller set of warning options for lib/. 749 # We use a slightly smaller set of warning options for lib/.