(svn r20723) -Fix: don't define _FORTIFY_SOURCE when not compiling with GCC, other compilers would likely barf on GLIBC code

pull/155/head
smatz 14 years ago
parent 0bd09d8321
commit 474480799f

@ -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

Loading…
Cancel
Save