solenv/gbuild/platform/unxgcc.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8368f48df8d67f6c712534647f4d375bf219ae99
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Mon Dec 6 12:06:08 2021 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Mon Dec 6 13:52:26 2021 +0100

    Limit static system library linking to fuzzers
    
    When building a static LO on Linux, I get a lost of missing
    symbols for binaries, like oosplash. In that case we just link to
    Xinerama, but this has obviously other X11-based dependencies,
    and there is no real way to fix this.
    
    According to caolan, this was just added in commit
    7a3eaef6dd707781c2f4e341aebb9d4c42df780f ("for DISABLE_DYNLOADING
    support linking to static .a system libs") to support instrumented
    static libraries used for the oss-fuzz runs (see
    https://github.com/google/oss-fuzz/issues/608).
    
    So actually limit these flags for FUZZERS only.
    
    Change-Id: I7eaa81c46fab040848fdf4dbe100a6e634f54446
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126409
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>

diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 60e63f36cd3a..a7631f4446a3 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -129,11 +129,11 @@ $(call gb_Helper_abbreviate_dirs,\
                $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat 
$(extraobjectlist)`) \
                $(if $(filter TRUE,$(DISABLE_DYNLOADING)), \
                    -Wl$(COMMA)--start-group \
-                   -Wl$(COMMA)-Bstatic \
+                   $(call gb_Helper_optional,FUZZERS,-Wl$(COMMA)-Bstatic) \
                    $(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(patsubst 
%.$(gb_Library_UDK_MAJORVER),%,$(foreach lib,$(LINKED_LIBS),$(call 
gb_Library_get_filename,$(lib)))))) \
                    $(foreach lib,$(LINKED_STATIC_LIBS),$(call 
gb_StaticLibrary_get_target,$(lib))) \
                    $(T_LIBS) \
-                   -Wl$(COMMA)-Bdynamic \
+                   $(call gb_Helper_optional,FUZZERS,-Wl$(COMMA)-Bdynamic) \
                    $(if 
$(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS)$(filter-out 
XTRUE,X$(ENABLE_RUNTIME_OPTIMIZATIONS)),$(T_STDLIBS_CXX)) \
                    -Wl$(COMMA)--end-group \
                    , \

Reply via email to