summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-11-14 12:20:17 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2014-11-14 12:25:11 -0800
commit5caf6c9358068f9fca8ebde3230a2df1155c0d0c (patch)
tree7eb19fd74855401edcf9b2270732c6d517e01ef3 /configure.ac
parent9bcde6cdcaa0494aaac20ff23101577aa80de5b0 (diff)
downloademacs-5caf6c9358068f9fca8ebde3230a2df1155c0d0c.tar.gz
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 4 insertions, 3 deletions
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.