summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/distdir-way-opts.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 62a145162e..c4d716894c 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -190,7 +190,8 @@ $1_$2_$3_ALL_CC_OPTS = \
$$($1_$2_$3_CC_OPTS) \
$$($$(basename $$<)_CC_OPTS) \
$$($1_$2_EXTRA_CC_OPTS) \
- $$(EXTRA_CC_OPTS)
+ $$(EXTRA_CC_OPTS) \
+ $$(if $$(findstring YES,$$($1_$2_SplitSections)),-ffunction-sections -fdata-sections)
$1_$2_$3_GHC_CC_OPTS = \
$$(addprefix -optc, $$($1_$2_$3_ALL_CC_OPTS)) \