diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-06 12:06:08 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-06 13:52:26 +0100 |
commit | 8368f48df8d67f6c712534647f4d375bf219ae99 (patch) | |
tree | ba812fb015698abe5fbfbcf25589d55ee62fc270 /solenv | |
parent | 8fe1a3c479d4aeaeb3a378aaceb77f72edcfb7c8 (diff) |
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 <glogow@fbihome.de>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 4 |
1 files changed, 2 insertions, 2 deletions
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 \ , \ |