summaryrefslogtreecommitdiff
path: root/solenv/gbuild/platform/com_GCC_defs.mk
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/gbuild/platform/com_GCC_defs.mk')
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk6
1 files changed, 6 insertions, 0 deletions
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 \