From 8aa125c0f27520d9c6938084f3fb4f97fefcc720 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 10 Aug 2018 16:57:06 +0100 Subject: when DISABLE_DYNLOADING gc linking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifba1dd8e6cf095b965ed1277ce63505085f1d13c Reviewed-on: https://gerrit.libreoffice.org/58854 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- solenv/gbuild/platform/com_GCC_defs.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 25bb4bdf6889..057ef8fd5762 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -94,6 +94,12 @@ gb_LinkTarget_LDFLAGS += -fprofile-arcs -lgcov gb_COMPILEROPTFLAGS := -O0 endif +ifeq ($(DISABLE_DYNLOADING),TRUE) +gb_CFLAGS_COMMON += -ffunction-sections -fdata-sections +gb_CXXFLAGS_COMMON += -ffunction-sections -fdata-sections +gb_LinkTarget_LDFLAGS += -Wl,--gc-sections +endif + ifeq ($(shell expr '$(GCC_VERSION)' '>=' 600),1) gb_CFLAGS_COMMON += \ -Wduplicated-cond \ -- cgit