From: Mike Frysinger Date: Tue, 23 Oct 2012 19:20:07 +0000 (-0400) Subject: build: do not redefine _FORTIFY_SOURCE X-Git-Tag: v8.21~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9517680ed3d4d7baff8a842a052ad405f9e9049f;p=thirdparty%2Fcoreutils.git build: do not redefine _FORTIFY_SOURCE When _FORTIFY_SOURCE is defined by the compiler or via flags, as it is on Gentoo, do not override it. Otherwise we get many redefinition warnings. * configure.ac (FORTIFY_SOURCE): Check if _FORTIFY_SOURCE is defined. This addresses http://bugs.gnu.org/12714 --- diff --git a/configure.ac b/configure.ac index e5e05be5c1..6504144ee6 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,7 @@ if test "$gl_gcc_warnings" = yes; then AH_VERBATIM([FORTIFY_SOURCE], [/* Enable compile-time and run-time bounds-checking, and some warnings, without upsetting glibc 2.15+. */ - #if defined __OPTIMIZE__ && __OPTIMIZE__ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ # define _FORTIFY_SOURCE 2 #endif ])