summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-02-17 14:56:34 +0000
committerIan Lynagh <ian@well-typed.com>2013-02-17 14:56:34 +0000
commitb8bf9a3b4096971803a1bd4c8c98a7d4d393d886 (patch)
tree3eacd8afdad9516a1df4337a0e29a2add5d327d2
parentffe795d92b1e0c385474100ecfb649fd40ae6b4d (diff)
downloadhaskell-b8bf9a3b4096971803a1bd4c8c98a7d4d393d886.tar.gz
Finish removing BootingFromHc
-rw-r--r--compiler/ghc.mk2
-rw-r--r--distrib/configure.ac.in3
-rw-r--r--ghc.mk10
-rw-r--r--ghc/ghc.mk5
-rw-r--r--mk/config.mk.in4
-rw-r--r--rts/ghc.mk4
-rw-r--r--rules/build-package-way.mk4
-rw-r--r--rules/build-prog.mk3
-rw-r--r--rules/c-suffix-rules.mk3
-rw-r--r--rules/cmm-suffix-rules.mk4
-rw-r--r--rules/hs-suffix-rules-srcdir.mk6
-rw-r--r--rules/hs-suffix-rules.mk2
-rw-r--r--utils/Makefile6
13 files changed, 1 insertions, 55 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 854b756330..bb9a08f0f5 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -258,7 +258,6 @@ compiler/stage$1/build/Parser.y: compiler/parser/Parser.y.pp
compiler/stage$1/build/primops.txt: compiler/prelude/primops.txt.pp compiler/stage$1/$$(PLATFORM_H)
$$(CPP) $$(RAWCPP_FLAGS) -P $$(compiler_CPP_OPTS) -Icompiler/stage$1 -x c $$< | grep -v '^#pragma GCC' > $$@
-ifneq "$$(BootingFromHc)" "YES"
compiler/stage$1/build/primop-data-decl.hs-incl: compiler/stage$1/build/primops.txt $$(GENPRIMOP_INPLACE)
"$$(GENPRIMOP_INPLACE)" --data-decl < $$< > $$@
compiler/stage$1/build/primop-tag.hs-incl: compiler/stage$1/build/primops.txt $$(GENPRIMOP_INPLACE)
@@ -286,7 +285,6 @@ compiler/stage$1/build/primop-primop-info.hs-incl: compiler/stage$1/build/primop
# can still generate them if we want them back
compiler/stage$1/build/primop-usage.hs-incl: compiler/stage$1/build/primops.txt $$(GENPRIMOP_INPLACE)
"$$(GENPRIMOP_INPLACE)" --usage < $$< > $$@
-endif
endef
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index 2f96a1a7eb..09b54577bf 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -9,9 +9,6 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], [@ProjectVersion@], [
FP_BINDIST_GHC_PWD
FP_FIND_ROOT
-BootingFromHc=NO
-AC_SUBST(BootingFromHc)
-
dnl--------------------------------------------------------------------
dnl * Deal with arguments telling us gmp is somewhere odd
dnl--------------------------------------------------------------------
diff --git a/ghc.mk b/ghc.mk
index 8a872116c0..45cb1564c7 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -1190,16 +1190,6 @@ publish-sdist :
$(call try10Times,$(PublishCp) $(SRC_DIST_TESTSUITE_TARBALL) $(PublishLocation)/dist)
endif
-ifeq "$(BootingFromHc)" "YES"
-# In a normal build we use GHC to compile C files (see
-# rules/c-suffix-rules.mk), which passes a number of its own options
-# to the C compiler. So when bootstrapping we have to provide these
-# flags explicitly to C compilations.
-SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER
-SRC_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt)
-SRC_CC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS))
-endif
-
# -----------------------------------------------------------------------------
# sdisting libraries
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 71356fccf0..554660e812 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -161,11 +161,6 @@ $(GHC_STAGE2) : | $(TOUCHY)
$(GHC_STAGE3) : | $(TOUCHY)
endif
-ifeq "$(BootingFromHc)" "YES"
-$(GHC_STAGE2) : $(ALL_STAGE1_LIBS)
-ghc_stage2_OTHER_OBJS += $(compiler_stage2_v_LIB) $(ALL_STAGE1_LIBS) $(ALL_STAGE1_LIBS) $(ALL_STAGE1_LIBS) $(ALL_RTS_LIBS) $(libffi_STATIC_LIB)
-endif
-
endif
INSTALL_LIBS += settings
diff --git a/mk/config.mk.in b/mk/config.mk.in
index e365d14a05..fdc680f9a2 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -36,10 +36,6 @@ V = 1
#
################################################################################
-# BootingFromHc - build GHC and the libraries from .hc files?
-# (unregisterised only)
-BootingFromHc = NO
-
NO_INCLUDE_DEPS = NO
NO_INCLUDE_PKGDATA = NO
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 7cbb96ef0a..7c2e7468f7 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -153,8 +153,6 @@ endif
$(call distdir-way-opts,rts,dist,$1)
$(call c-suffix-rules,rts,dist,$1,YES)
$(call cmm-suffix-rules,rts,dist,$1)
-$(call hs-suffix-rules-srcdir,rts,dist,$1,.)
-# hs-suffix-rules-srcdir is needed when BootingFromHc to get the .hc rules
rts_$1_LIB_NAME = libHSrts$$($1_libsuf)
rts_$1_LIB = rts/dist/build/$$(rts_$1_LIB_NAME)
@@ -547,9 +545,7 @@ endif
$(eval $(call manual-package-config,rts))
-ifneq "$(BootingFromHc)" "YES"
rts/package.conf.inplace : $(includes_H_CONFIG) $(includes_H_PLATFORM)
-endif
# -----------------------------------------------------------------------------
# installing
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk
index aade4e93af..a8dfc5a722 100644
--- a/rules/build-package-way.mk
+++ b/rules/build-package-way.mk
@@ -43,10 +43,6 @@ endif
# [inconsistent distdirs].
$1_$2_$3_DEPS_LIBS=$$(foreach dep,$$($1_$2_DEPS),$$($$(dep)_$(subst stage2,dist-install,$2)_$3_LIB))
-ifeq "$$(BootingFromHc)" "YES"
-$1_$2_$3_C_OBJS += $$(shell $$(FIND) $1/$2/build -name "*_stub.c" -print | sed 's/c$$$$/o/')
-endif
-
$1_$2_$3_NON_HS_OBJS = $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
$1_$2_$3_ALL_OBJS = $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_NON_HS_OBJS)
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 400c6208f4..3cbd713e8e 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -160,9 +160,6 @@ $(call c-objs,$1,$2,$$($1_$2_PROGRAM_WAY))
$(call hs-objs,$1,$2,$$($1_$2_PROGRAM_WAY))
$1_$2_LINK_WITH_GCC = NO
-ifeq "$$(BootingFromHc)" "YES"
-$1_$2_LINK_WITH_GCC = YES
-endif
ifeq "$$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS)" ""
# We don't want to link the GHC RTS into C-only programs. There's no
diff --git a/rules/c-suffix-rules.mk b/rules/c-suffix-rules.mk
index 6d4bfe1755..628546c077 100644
--- a/rules/c-suffix-rules.mk
+++ b/rules/c-suffix-rules.mk
@@ -19,8 +19,7 @@ define c-suffix-rules
ifneq "$$(BINDIST)" "YES"
-# UseGhcForCc is only relevant when not booting from HC files.
-ifeq "$4 $$(BootingFromHc)" "YES NO"
+ifeq "$4" "YES"
$1/$2/build/%.$$($3_osuf) : $1/%.c $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
$$(call cmd,$1_$2_HC) $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
diff --git a/rules/cmm-suffix-rules.mk b/rules/cmm-suffix-rules.mk
index 0c8b0716e6..6546f86004 100644
--- a/rules/cmm-suffix-rules.mk
+++ b/rules/cmm-suffix-rules.mk
@@ -20,8 +20,6 @@ define cmm-suffix-rules
ifneq "$$(CLEANING)" "YES"
-ifneq "$$(BootingFromHc)" "YES"
-
$1/$2/build/%.$$($3_way_)o : $1/%.cmm $$(rts_H_FILES) $$(includes_H_FILES) $$(includes_DERIVEDCONSTANTS) $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
$$(call cmd,$1_$2_HC) $$($1_$2_$3_MOST_HC_OPTS) -c $$< -o $$@
@@ -50,7 +48,5 @@ $1/$2/build/%.$$($3_way_)hc : $1/$2/build/%.cmm $$(rts_H_FILES) $$(includes_H_FI
endif
-endif
-
endef
diff --git a/rules/hs-suffix-rules-srcdir.mk b/rules/hs-suffix-rules-srcdir.mk
index 776d1ce0f6..2a0480f0c3 100644
--- a/rules/hs-suffix-rules-srcdir.mk
+++ b/rules/hs-suffix-rules-srcdir.mk
@@ -18,8 +18,6 @@ define hs-suffix-rules-srcdir
ifneq "$$(BINDIST)" "YES"
-ifneq "$$(BootingFromHc)" "YES"
-
$1/$2/build/%.hs : $1/$4/%.ly | $$$$(dir $$$$@)/.
$$(call cmd,HAPPY) $$($1_$2_$3_ALL_HAPPY_OPTS) $$< -o $$@
@@ -54,8 +52,6 @@ $1/$2/build/%.$$($3_hcsuf) : $1/$4/%.lhs $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP) $$
$(call hi-rule,$1/$4,$1/$2/build,$3)
-endif
-
# XXX: for some reason these get used in preference to the direct
# .hs->.o rule, I don't know why --SDM
@@ -88,12 +84,10 @@ $1/$2/build/%.$$($3_way_)o-boot : $1/$4/%.hs-boot $$(LAX_DEPS_FOLLOW) $$($1_$2_H
$1/$2/build/%.$$($3_way_)o-boot : $1/$4/%.lhs-boot $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP) $$($1_$2_PKGDATA_DEP)
$$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@
-ifneq "$$(BootingFromHc)" "YES"
# stubs are automatically generated and compiled by GHC
$1/$2/build/%_stub.$$($3_osuf): $1/$2/build/%.$$($3_osuf)
@:
-endif
endif
diff --git a/rules/hs-suffix-rules.mk b/rules/hs-suffix-rules.mk
index fead7d1d41..459ee372e9 100644
--- a/rules/hs-suffix-rules.mk
+++ b/rules/hs-suffix-rules.mk
@@ -14,7 +14,6 @@
define hs-suffix-rules # args: $1 = dir, $2 = distdir, $3 = way
ifneq "$$(BINDIST)" "YES"
-ifneq "$$(BootingFromHc)" "YES"
$1/$2/build/%.$$($3_hcsuf) : $1/$2/build/%.hs $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP)
$$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -C $$< -o $$@
@@ -32,7 +31,6 @@ $(call hi-rule,$1/$2/build,$1/$2/build,$3)
$(call hi-rule,$1/$2/build/autogen,$1/$2/build,$3)
endif
-endif
$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\
$$(eval $$(call hs-suffix-rules-srcdir,$1,$2,$3,$$(dir))))
diff --git a/utils/Makefile b/utils/Makefile
index e522c32ba8..544a21dd08 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -5,12 +5,8 @@ ifeq "$(DOING_BIN_DIST)" "YES"
# We're doing a binary-dist, descend into a subset of the dirs.
SUBDIRS = mkdirhier hp2ps parallel unlit
else
-ifeq "$(BootingFromHc)" "YES"
-SUBDIRS = mkdependC mkdirhier runstdtest genapply genprimopcode unlit
-else
SUBDIRS = mkdependC mkdirhier runstdtest hp2ps \
parallel unlit genprimopcode genapply
-endif
#ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
## lndir doesn't build on Windows
#SUBDIRS += lndir
@@ -44,10 +40,8 @@ endif
include $(TOP)/mk/target.mk
# genprimopcode is needed to boot in ghc/compiler...
-ifneq "$(BootingFromHc)" "YES"
boot ::
$(MAKE) -C genprimopcode
-endif
############################################