From d2711be2e3d192ab1ce28b092530854c37962c6d Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 28 May 2013 21:12:23 +0100 Subject: [PATCH] Fix booting again --- mk/boilerplate.mk | 6 ++++++ nofib-analyse/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mk/boilerplate.mk b/mk/boilerplate.mk index c89b60c0..00659c4a 100644 --- a/mk/boilerplate.mk +++ b/mk/boilerplate.mk @@ -18,6 +18,10 @@ show: RM = rm -f SIZE = size STRIP = strip +PERL = /usr/bin/perl +CONTEXT_DIFF = diff -U 1 +DEFAULT_TMPDIR = /tmp +EXECUTABLE_FILE = chmod +x # Benchmarks controls which set of tests should be run # You can run one or more of @@ -97,6 +101,7 @@ endif endif MKDEPENDHS := $(HC) # ToDo: wrong, if $(HC) isn't GHC. +BOOT_HC := $(HC) 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/")$$$$//') @@ -108,6 +113,7 @@ endef $(eval $(call get-ghc-rts-field,HC_VERSION,GHC version)) $(eval $(call get-ghc-field,SplitObjs,Object splitting supported)) +$(eval $(call get-ghc-field,CC,C compiler command)) 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) diff --git a/nofib-analyse/Makefile b/nofib-analyse/Makefile index ce86d246..6fbd6227 100644 --- a/nofib-analyse/Makefile +++ b/nofib-analyse/Makefile @@ -4,7 +4,7 @@ include $(TOP)/mk/boilerplate.mk PROG = nofib-analyse $(PROG): - $(GHC) -O -cpp --make Main -o $(PROG) + $(BOOT_HC) -O -cpp --make Main -o $(PROG) all :: $(PROG)