]> code.delx.au - gnu-emacs/commitdiff
build: port to GCC 4.6.4 + glibc 2.5
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 14 Nov 2014 20:20:17 +0000 (12:20 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 14 Nov 2014 20:25:11 +0000 (12:25 -0800)
On platforms this old, building with _FORTIFY_SOURCE equal to 2
results in duplicate definitions of standard library functions.
Problem reported by Nelson H. F. Beebe.
* configure.ac (_FORTIFY_SOURCE): Sort after GNULIB_PORTCHECK.
By default, do not enable this unless GNULIB_PORTCHECK is defined.
This better matches the original intent, which as I recall was to
enable these extra checks only with --enable-gcc-warnings.

ChangeLog
configure.ac

index 92c399596893331cfd52025c69cfc3cbb4b56909..0e9dc0d5c69e5e9c75b1621e9d39b4da1beb1d93 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2014-11-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       build: port to GCC 4.6.4 + glibc 2.5
+       On platforms this old, building with _FORTIFY_SOURCE equal to 2
+       results in duplicate definitions of standard library functions.
+       Problem reported by Nelson H. F. Beebe.
+       * configure.ac (_FORTIFY_SOURCE): Sort after GNULIB_PORTCHECK.
+       By default, do not enable this unless GNULIB_PORTCHECK is defined.
+       This better matches the original intent, which as I recall was to
+       enable these extra checks only with --enable-gcc-warnings.
+
 2014-11-14  David Reitter  <david.reitter@gmail.com>
 
        * Makefile.in (install-arch-indep): Compress publicsuffix.txt file.
index b2b98a0936b843afc3e8db6c8f0d6e1399f13f54..5d71c2f6a6e6a394fffd2d87cf1b972901a68a1f 100644 (file)
@@ -899,14 +899,15 @@ else
   fi
 
   AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
-  AH_VERBATIM([FORTIFY_SOURCE],
+  AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
+  AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE],
   [/* Enable compile-time and run-time bounds-checking, and some warnings,
       without upsetting glibc 2.15+. */
-   #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
+   #if (defined GNULIB_PORTCHECK && !defined _FORTIFY_SOURCE \
+        && defined __OPTIMIZE__ && __OPTIMIZE__)
    # define _FORTIFY_SOURCE 2
    #endif
   ])
-  AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
 
   # We use a slightly smaller set of warning options for lib/.
   # Remove the following and save the result in GNULIB_WARN_CFLAGS.