# HG changeset patch # User smatz # Date 2016-05-31 19:33:33 # Node ID 10d8fd8cb1a957aa07b43e762729a3b4604dfb2b # Parent 1bc1eb28b78174e886040e1e13f2722723541a18 (svn r27595) -Fix: prevent GCC 6 over-optimization diff --git a/config.lib b/config.lib --- 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'`