diff options
author | smatz <smatz@openttd.org> | 2010-09-03 13:09:56 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2010-09-03 13:09:56 +0000 |
commit | 223fed5458a69ef76421ee5528c701e463ab60ee (patch) | |
tree | 3308af7b13cd8cba49d1fa8457ac531c7f94980c | |
parent | 72bd89b9005cb1dfaaba1c9aac0c6e94dec7a553 (diff) | |
download | openttd-223fed5458a69ef76421ee5528c701e463ab60ee.tar.xz |
(svn r20723) -Fix: don't define _FORTIFY_SOURCE when not compiling with GCC, other compilers would likely barf on GLIBC code
-rw-r--r-- | config.lib | 8 |
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 |