summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-03-02 00:45:08 +0000
committertruelight <truelight@openttd.org>2007-03-02 00:45:08 +0000
commitf414b1d8e2077cd8bc3fb788345acd446acd0571 (patch)
tree1a4ab6631dfa64d27a044f9f0969aa4a6d41cc63
parent88d2a89422afb10fcd41b5865e8cb21aeaefb94d (diff)
downloadopenttd-f414b1d8e2077cd8bc3fb788345acd446acd0571.tar.xz
(svn r8968) -Fix (win32): silent g++ 4.0+ warnings about breaking strict-aliasing
-rw-r--r--config.lib3
1 files changed, 3 insertions, 0 deletions
diff --git a/config.lib b/config.lib
index 4f0d501db..56d6c402c 100644
--- a/config.lib
+++ b/config.lib
@@ -671,6 +671,9 @@ make_cflags_and_ldflags() {
if [ "$os" = "CYGWIN" ] || [ "$os" = "MINGW" ]; then
LDFLAGS="$LDFLAGS -Wl,--subsystem,windows"
LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
+ if [ $cc_version -ge 40 ]; then
+ CFLAGS="$CFLAGS -fno-strict-aliasing"
+ fi
fi
if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ]; then