Commit a3832d20 authored by Ian Lynagh's avatar Ian Lynagh

Use -rtsopts if we have GHC >= 6.13

parent f9e7f8d6
......@@ -72,6 +72,18 @@ HC = $(WithNofibHc)
MKDEPENDHS := $(WithNofibHc)
endif
define get-ghc-rts-field # $1 = result variable, $2 = field name
$1 := $$(shell '$$(HC)' +RTS --info | grep '^ .("$2",' | tr -d '\r' | sed -e 's/.*", *"//' -e 's/")$$$$//')
endef
$(eval $(call get-ghc-rts-field,HC_VERSION,GHC version))
define ghc-ge # $1 = major version, $2 = minor version
HC_VERSION_GE_$1_$2 := $$(shell if [ `echo $$(HC_VERSION) | sed 's/\..*//'` -gt $1 ]; then echo YES; else if [ `echo $$(HC_VERSION) | sed 's/\..*//'` -ge $1 ] && [ `echo $$(HC_VERSION) | sed -e 's/[^.]*\.//' -e 's/\..*//'` -ge $2 ]; then echo YES; else echo NO; fi; fi)
endef
$(eval $(call ghc-ge,6,13))
MKDEPENDC := $(GHC_TOP)/$(MKDEPENDC)
RUNTEST = $(NOFIB_TOP)/runstdtest/runstdtest
......
......@@ -61,6 +61,10 @@ endif
HC_OPTS = $(BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS) $(SRC_HC_OPTS) $(WAY$(_way)_HC_OPTS) $($*_HC_OPTS) $(EXTRA_HC_OPTS)
ifeq "$(HC_VERSION_GE_6_13)" "YES"
HC_OPTS += -rtsopts
endif
HC_POST_OPTS = $(SRC_HC_POST_OPTS) $(WAY$(_way)_HC_POST_OPTS) $($*_HC_POST_OPTS) $(EXTRA_HC_POST_OPTS)
HC_PRE_OPTS = $(SRC_HC_PRE_OPTS) $(WAY$(_way)_HC_PRE_OPTS) $($*_HC_PRE_OPTS) $(EXTRA_HC_PRE_OPTS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment