1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

(svn r21662) -Codechange: use -flto=jobserver for GCC 4.6, it makes linking with LTO use number of processes passed to make -j

This commit is contained in:
smatz
2010-12-29 20:46:35 +00:00
parent 14d8ef9add
commit c986325763
2 changed files with 7 additions and 3 deletions

View File

@@ -1295,7 +1295,11 @@ make_compiler_cflags() {
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"
if [ $cc_version -lt 46 ]; then
flags="$flags -flto"
else
flags="$flags -flto=jobserver"
fi
ldflags="$ldflags -fwhole-program"
features="$features lto"
fi