From 06780a92b3e4ea14c09a169cc1d22c1371621fc3 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 31 Jul 2012 13:14:28 +0100 Subject: build: Allow building with new glibc headers and -O0. This is a patch taken from libvirt. See: http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=2af63b1c349 --- configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 7f99fe62..60f6ad85 100644 --- a/configure.ac +++ b/configure.ac @@ -158,9 +158,12 @@ if test "$gl_gcc_warnings" = yes; then AC_SUBST([WARN_CFLAGS]) AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) - AC_DEFINE([_FORTIFY_SOURCE], [2], - [enable compile-time and run-time bounds-checking, and some warnings]) AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) + AH_VERBATIM([FORTIFY_SOURCE], + [/* Enable compile-time and run-time bounds-checking, and some warnings. */ +#if __OPTIMIZE__ +# define _FORTIFY_SOURCE 2 +#endif]) fi AC_C_PROTOTYPES -- cgit