summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-27 09:22:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-27 10:05:02 +0200
commitf4acb2a916de9762dfe7fe1b4120ea758e234d34 (patch)
tree328a8165b9971fcf4560afee2c7ae3a743362a73
parent3a028418190790c3bbaf6e505ff55b7bb8c0b474 (diff)
Revert "bloaty: use -ffunction-sections and --gc-sections for linking"
This reverts commit bd39ec554f90badccfb26c843fd0d43237f1b622. Reason for revert: For -ffunction-sections and -fdata-sections, <https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#Optimize-Options> warns: "Only use these options when there are significant benefits from doing so. When you specify these options, the assembler and linker create larger object and executable files and are also slower. These options affect code generation. They prevent optimizations by the compiler and assembler using relative locations inside a translation unit since the locations are unknown until link time. An example of such an optimization is relaxing calls to short call instructions." Change-Id: I84225ca94de9afff23bdd2913c77095d5d26f7ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94950 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk4
1 files changed, 1 insertions, 3 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 766d53c07526..1707a7481ee6 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -106,9 +106,7 @@ gb_LinkTarget_LDFLAGS += -fprofile-arcs -lgcov
gb_COMPILEROPTFLAGS := -O0
endif
-# Strip out duplicates, which happen a lot with e.g. UNO
-# functions declared in UNO header files.
-ifneq ($(OS_FOR_BUILD),MACOSX)
+ifeq ($(DISABLE_DYNLOADING),TRUE)
gb_CFLAGS_COMMON += -ffunction-sections -fdata-sections
gb_CXXFLAGS_COMMON += -ffunction-sections -fdata-sections
gb_LinkTarget_LDFLAGS += -Wl,--gc-sections