Add C and linker flags to hsc2hs; fixes trac #3400
authorIan Lynagh <igloo@earth.li>
Sat, 7 Nov 2009 19:44:49 +0000 (19:44 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 7 Nov 2009 19:44:49 +0000 (19:44 +0000)
ghc.mk

diff --git a/ghc.mk b/ghc.mk
index 3be5d61..28f7c85 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -23,6 +23,11 @@ utils/hsc2hs_dist-install_HC_OPTS += -DNEW_GHC_LAYOUT
 
 utils/hsc2hs_template=$(INPLACE_TOPDIR)/template-hsc.h
 
+define utils/hsc2hs_dist_SHELL_WRAPPER_EXTRA
+echo 'HSC2HS_EXTRA="$(addprefix --cflag=,$(CONF_CC_OPTS)) $(addprefix --lflag=,$(CONF_LD_OPTS))"' >> "$(WRAPPER)"
+endef
+utils/hsc2hs_dist-install_SHELL_WRAPPER_EXTRA = $(utils/hsc2hs_dist_SHELL_WRAPPER_EXTRA)
+
 ifneq "$(BINDIST)" "YES"
 
 $(HSC2HS_INPLACE) : $(utils/hsc2hs_template)