From 223fed5458a69ef76421ee5528c701e463ab60ee Mon Sep 17 00:00:00 2001 From: smatz Date: Fri, 3 Sep 2010 13:09:56 +0000 Subject: [PATCH] (svn r20723) -Fix: don't define _FORTIFY_SOURCE when not compiling with GCC, other compilers would likely barf on GLIBC code --- config.lib | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config.lib b/config.lib index 1afbdb9310..754058fe86 100644 --- a/config.lib +++ b/config.lib @@ -1262,7 +1262,13 @@ make_cflags_and_ldflags() { # Each debug level reduces the optimization by a bit if [ $enable_debug -ge 1 ]; then - CFLAGS="$CFLAGS -g -D_DEBUG -D_FORTIFY_SOURCE=2" + CFLAGS="$CFLAGS -g -D_DEBUG" + if basename "$cc_host" | grep "gcc" &>/dev/null; then + # Define only when compiling with GCC, some + # GLIBC versions use GNU extensions in a way + # that breaks build with at least ICC + CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" + fi if [ "$os" = "PSP" ]; then CFLAGS="$CFLAGS -G0" fi