solenv/gbuild/platform/com_GCC_defs.mk |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 21d8cab837bf035f7e035a06796e46240ea7b51e
Author:     Christian Lohmaier <[email protected]>
AuthorDate: Wed Oct 27 20:19:44 2021 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Jan 3 14:33:40 2022 +0100

    -flto: only use firstword of PARALLELISM
    
    jenkins agents use PARALLELISM with additional load limit, e.g.
    PARALLELISM="16 -l 24" causing the linker to complain about not finding
    -l24 when lto is enabled. So only use the first element/the number of
    jobs to use and omit the load limit here.
    
    Change-Id: Ie3e2bdbde1b89d9371d1d9b9e426f42a91d2eca8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124288
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <[email protected]>

diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index b1d8c6e6a331..45f39219173d 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -183,7 +183,8 @@ ifeq (,$(index,iOS MACOSX,$(OS)))
 gb_LTOPLUGINFLAGS := --plugin LLVMgold.so
 endif
 else
-gb_LTOFLAGS := -flto=$(if $(filter-out 0,$(PARALLELISM)),$(PARALLELISM),auto) 
-fuse-linker-plugin -O2
+# use first element of the PARALLELISM, to allow values like "12 -l 14" to 
specify load limits
+gb_LTOFLAGS := -flto=$(if $(filter-out 0,$(PARALLELISM)),$(firstword 
$(PARALLELISM)),auto) -fuse-linker-plugin -O2
 # clang does not support -flto=<number>
 gb_CLANG_LTOFLAGS := -flto=thin
 endif
commit f1d39cc831bf37190e6df8b3fede08ae4df27e0a
Author:     Luboš Luňák <[email protected]>
AuthorDate: Wed Oct 13 01:32:23 2021 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Jan 3 14:33:34 2022 +0100

    use -flto=auto for gcc if no $PARALLELISM is set
    
    I'm not sure if all gcc versions support the value, but if older
    ones do not they at least silently accept it.
    
    Change-Id: If18ce1cbf6122cf9ded00eee5c2058d70e486c0c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123540
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <[email protected]>

diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 9b7e6f739552..b1d8c6e6a331 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -183,7 +183,7 @@ ifeq (,$(index,iOS MACOSX,$(OS)))
 gb_LTOPLUGINFLAGS := --plugin LLVMgold.so
 endif
 else
-gb_LTOFLAGS := -flto$(if $(filter-out 0,$(PARALLELISM)),=$(PARALLELISM)) 
-fuse-linker-plugin -O2
+gb_LTOFLAGS := -flto=$(if $(filter-out 0,$(PARALLELISM)),$(PARALLELISM),auto) 
-fuse-linker-plugin -O2
 # clang does not support -flto=<number>
 gb_CLANG_LTOFLAGS := -flto=thin
 endif

Reply via email to