From: Paul Eggert Date: Fri, 14 Nov 2014 20:20:17 +0000 (-0800) Subject: build: port to GCC 4.6.4 + glibc 2.5 X-Git-Tag: emacs-25.0.90~2635^2~471 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5caf6c9358068f9fca8ebde3230a2df1155c0d0c;p=emacs.git 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. --- diff --git a/ChangeLog b/ChangeLog index 92c39959689..0e9dc0d5c69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2014-11-14 Paul Eggert + + 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 * Makefile.in (install-arch-indep): Compress publicsuffix.txt file. diff --git a/configure.ac b/configure.ac index b2b98a0936b..5d71c2f6a6e 100644 --- a/configure.ac +++ b/configure.ac @@ -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.