summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-08-05 15:06:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-08-05 16:28:50 +0200
commit3d0eebe0f1471db6f0b9a472a582f51c8c37753b (patch)
tree5be76ea32c95b983f3a7eafd67e0ae47a875e464
parent76c40b82e6a44539cd43f326c00246e759449571 (diff)
Adapt --enable-lto to --without-parallelism
...which sets PARALLELISM to 0 and thus caused cc1: error: unrecognized argument to ‘-flto=’ option: ‘0’ at least with recent GCC 11 trunk Change-Id: Ifcfb6485c1c2efc8ab798686ca7fc2392d2cfc2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100171 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 11d85608a22d..42d8eefff7fd 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -184,7 +184,7 @@ ifeq ($(COM_IS_CLANG),TRUE)
gb_LTOFLAGS := -flto
gb_LTOPLUGINFLAGS := --plugin LLVMgold.so
else
-gb_LTOFLAGS := -flto=$(PARALLELISM) -fuse-linker-plugin -O2
+gb_LTOFLAGS := -flto$(if $(filter-out 0,$(PARALLELISM)),=$(PARALLELISM)) -fuse-linker-plugin -O2
endif
endif