summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2016-05-31 19:33:33 +0000
committersmatz <smatz@openttd.org>2016-05-31 19:33:33 +0000
commit4bd149d05af56849d68d34e73230bf32209cbd80 (patch)
treef2396f91069cd43a9b7ed1d9e2a7395eaaaabcae
parenta2edf52b418743dc82a823ef1d65870584af4d4a (diff)
downloadopenttd-4bd149d05af56849d68d34e73230bf32209cbd80.tar.xz
(svn r27595) -Fix: prevent GCC 6 over-optimization
-rw-r--r--config.lib6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.lib b/config.lib
index 0259739eb..021f95cb2 100644
--- a/config.lib
+++ b/config.lib
@@ -1401,6 +1401,12 @@ make_compiler_cflags() {
flags="$flags -Wno-free-nonheap-object"
fi
+ if [ $cc_version -ge 60 ]; then
+ # -flifetime-dse=2 (default since GCC 6) doesn't play
+ # well with our custom pool item allocator
+ cxxflags="$cxxflags -flifetime-dse=1"
+ fi
+
if [ "$enable_lto" != "0" ]; then
# GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
has_lto=`$1 -dumpspecs | grep '\%{flto'`