summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.src.in4
-rw-r--r--config.lib6
2 files changed, 7 insertions, 3 deletions
diff --git a/Makefile.src.in b/Makefile.src.in
index cb5bb5d19..d03ecbd69 100644
--- a/Makefile.src.in
+++ b/Makefile.src.in
@@ -256,9 +256,9 @@ ifeq ($(OS), PSP)
# 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
# CC to link OpenTTD for PSP
- $(Q)$(CC_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
+ $(Q)+$(CC_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
else
- $(Q)$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
+ $(Q)+$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
endif
ifdef STRIP
$(Q)$(STRIP) $@
diff --git a/config.lib b/config.lib
index ab9576f01..c6ef17d74 100644
--- a/config.lib
+++ b/config.lib
@@ -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