mirror of https://github.com/OpenTTD/OpenTTD
(svn r21662) -Codechange: use -flto=jobserver for GCC 4.6, it makes linking with LTO use number of processes passed to make -j
parent
14d8ef9add
commit
c986325763
|
@ -256,9 +256,9 @@ ifeq ($(OS), PSP)
|
||||||
# Because of a bug in the PSP GCC tools, linking via CXX results
|
# Because of a bug in the PSP GCC tools, linking via CXX results
|
||||||
# in total chaos and more problems then you can handle. So we need
|
# in total chaos and more problems then you can handle. So we need
|
||||||
# CC to link OpenTTD for PSP
|
# CC to link OpenTTD for PSP
|
||||||
$(Q)$(CC_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
|
$(Q)+$(CC_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
|
||||||
else
|
else
|
||||||
$(Q)$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
|
$(Q)+$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
|
||||||
endif
|
endif
|
||||||
ifdef STRIP
|
ifdef STRIP
|
||||||
$(Q)$(STRIP) $@
|
$(Q)$(STRIP) $@
|
||||||
|
|
|
@ -1295,7 +1295,11 @@ make_compiler_cflags() {
|
||||||
has_lto=`$1 -dumpspecs | grep '\%{flto'`
|
has_lto=`$1 -dumpspecs | grep '\%{flto'`
|
||||||
if [ -n "$has_lto" ]; then
|
if [ -n "$has_lto" ]; then
|
||||||
# Use LTO only if we see LTO exists and is requested
|
# 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"
|
ldflags="$ldflags -fwhole-program"
|
||||||
features="$features lto"
|
features="$features lto"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue