summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 1707a7481ee6..766d53c07526 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -106,7 +106,9 @@ gb_LinkTarget_LDFLAGS += -fprofile-arcs -lgcov
gb_COMPILEROPTFLAGS := -O0
endif
-ifeq ($(DISABLE_DYNLOADING),TRUE)
+# Strip out duplicates, which happen a lot with e.g. UNO
+# functions declared in UNO header files.
+ifneq ($(OS_FOR_BUILD),MACOSX)
gb_CFLAGS_COMMON += -ffunction-sections -fdata-sections
gb_CXXFLAGS_COMMON += -ffunction-sections -fdata-sections
gb_LinkTarget_LDFLAGS += -Wl,--gc-sections