diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-03-02 12:22:20 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-03-02 12:22:20 +0000 |
commit | f1fcfff5109507d065b4d317ef6b2fee16cc7fd4 (patch) | |
tree | d0e925d2e100ec511ed1ec83eda2454ccdf57c76 /mk | |
parent | f92a6eef59816355ddc079b1e3633047a8c90968 (diff) | |
download | haskell-f1fcfff5109507d065b4d317ef6b2fee16cc7fd4.tar.gz |
Give hsc2hs different options in different stages; fixes #7705
Based on patch from Stephen Blackheath.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/config.mk.in | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in index e61c267749..88c6a35717 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -587,10 +587,20 @@ endif ifneq "$(Windows_Host)" "YES" SRC_HSC2HS_OPTS += --cross-safe endif -SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE0))) SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d)) + +define set_stage_HSC2HS_OPTS +# $1 = stage +SRC_HSC2HS_OPTS_STAGE$1 += $$(addprefix --cflag=,$$(filter-out -O,$$(SRC_CC_OPTS) $$(CONF_CC_OPTS_STAGE$1))) +SRC_HSC2HS_OPTS_STAGE$1 += $$(addprefix --cflag=,$$(CONF_CPP_OPTS_STAGE$1)) +SRC_HSC2HS_OPTS_STAGE$1 += $$(addprefix --lflag=,$$(CONF_GCC_LINKER_OPTS_STAGE$1)) +endef +$(eval $(call set_stage_HSC2HS_OPTS,0)) +$(eval $(call set_stage_HSC2HS_OPTS,1)) +$(eval $(call set_stage_HSC2HS_OPTS,2)) ifeq "$(CrossCompiling)" "YES" -SRC_HSC2HS_OPTS += --cross-compile +SRC_HSC2HS_OPTS_STAGE1 += --cross-compile +SRC_HSC2HS_OPTS_STAGE2 += --cross-compile endif ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" |