Finish removing BootingFromHc
authorIan Lynagh <ian@well-typed.com>
Sun, 17 Feb 2013 14:56:34 +0000 (14:56 +0000)
committerIan Lynagh <ian@well-typed.com>
Sun, 17 Feb 2013 14:56:34 +0000 (14:56 +0000)
13 files changed:
compiler/ghc.mk
distrib/configure.ac.in
ghc.mk
ghc/ghc.mk
mk/config.mk.in
rts/ghc.mk
rules/build-package-way.mk
rules/build-prog.mk
rules/c-suffix-rules.mk
rules/cmm-suffix-rules.mk
rules/hs-suffix-rules-srcdir.mk
rules/hs-suffix-rules.mk
utils/Makefile

index 854b756..bb9a08f 100644 (file)
@@ -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
 
index 2f96a1a..09b5457 100644 (file)
@@ -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 8a87211..45cb156 100644 (file)
--- 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
 
index 71356fc..554660e 100644 (file)
@@ -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
index e365d14..fdc680f 100644 (file)
@@ -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
 
index 7cbb96e..7c2e746 100644 (file)
@@ -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
index aade4e9..a8dfc5a 100644 (file)
@@ -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)
 
index 400c620..3cbd713 100644 (file)
@@ -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
index 6d4bfe1..628546c 100644 (file)
@@ -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 $$@
index 0c8b071..6546f86 100644 (file)
@@ -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
 
index 776d1ce..2a0480f 100644 (file)
@@ -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
 
index fead7d1..459ee37 100644 (file)
@@ -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))))
index e522c32..544a21d 100644 (file)
@@ -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
 
 ############################################