summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-12-08 14:39:31 +0000
committersmatz <smatz@openttd.org>2010-12-08 14:39:31 +0000
commitaa4251b4ede37d34dc114ad2eea414781beb2583 (patch)
tree2ddfb2edd391c77f11a1d96504bc8b2558ec463b
parentac0e83a7e22c3ed94130b2fc4de62fe38478b121 (diff)
downloadopenttd-aa4251b4ede37d34dc114ad2eea414781beb2583.tar.xz
(svn r21436) -Fix: LTO was no longer detected for GCC 4.6
-rw-r--r--config.lib6
1 files changed, 4 insertions, 2 deletions
diff --git a/config.lib b/config.lib
index 8c9bff9af..ce190e10a 100644
--- a/config.lib
+++ b/config.lib
@@ -622,7 +622,8 @@ check_params() {
fi
if [ "$enable_lto" != "0" ]; then
- has_lto=`($cxx_build -dumpspecs 2>&1 | grep '\%{flto}') || ($cxx_build -help ipo 2>&1 | grep '\-ipo')`
+ # GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
+ has_lto=`($cxx_build -dumpspecs 2>&1 | grep '\%{flto') || ($cxx_build -help ipo 2>&1 | grep '\-ipo')`
if [ -n "$has_lto" ]; then
log 1 "using link time optimization... yes"
else
@@ -1290,7 +1291,8 @@ make_compiler_cflags() {
fi
if [ "$enable_lto" != "0" ]; then
- has_lto=`$1 -dumpspecs | grep '\%{flto}'`
+ # GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
+ has_lto=`$1 -dumpspecs | grep '\%{flto'`
if [ -n "$has_lto" ]; then
# Use LTO only if we see LTO exists and is requested
flags="$flags -flto"