Commit 730aa6b2 authored by ian@well-typed.com's avatar ian@well-typed.com

Get the value of SplitObjs from the compiler we're using

parent 6e024937
...@@ -106,7 +106,12 @@ define get-ghc-rts-field # $1 = result variable, $2 = field name ...@@ -106,7 +106,12 @@ 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/")$$$$//') $1 := $$(shell '$$(HC)' +RTS --info | grep '^ .("$2",' | tr -d '\r' | sed -e 's/.*", *"//' -e 's/")$$$$//')
endef endef
define get-ghc-field # $1 = result variable, $2 = field name
$1 := $$(shell '$$(HC)' --info | grep '^ .("$2",' | tr -d '\r' | sed -e 's/.*", *"//' -e 's/")$$$$//')
endef
$(eval $(call get-ghc-rts-field,HC_VERSION,GHC version)) $(eval $(call get-ghc-rts-field,HC_VERSION,GHC version))
$(eval $(call get-ghc-field,SplitObjs,Object splitting supported))
define ghc-ge # $1 = major version, $2 = minor 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) 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)
......
...@@ -276,11 +276,6 @@ endif ...@@ -276,11 +276,6 @@ endif
# whether HS_SRCS is empty or not. # whether HS_SRCS is empty or not.
# #
# can't split objs in way 'u', so we disable it here
ifeq "$(way)" "u"
SplitObjs = NO
endif
ifneq "$(HS_SRCS)" "" ifneq "$(HS_SRCS)" ""
ifeq "$(SplitObjs)" "YES" ifeq "$(SplitObjs)" "YES"
......
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