Changeset - r16693:9e83aca3e39c
[Not reviewed]
master
0 1 0
smatz - 14 years ago 2010-12-08 14:39:31
smatz@openttd.org
(svn r21436) -Fix: LTO was no longer detected for GCC 4.6
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -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"
0 comments (0 inline, 0 general)