summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.lib8
1 files changed, 7 insertions, 1 deletions
diff --git a/config.lib b/config.lib
index 1afbdb931..754058fe8 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