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

Finish removing BootingFromHc

parent ffe795d9
......@@ -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
......
......@@ -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--------------------------------------------------------------------
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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 $$@
......
......@@ -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
......@@ -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
......
......@@ -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 $$@
......@@ -31,7 +30,6 @@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/autogen/%.hs $$(LAX_DEPS_FOLLOW) $$($1_$
$(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),\
......
......@@ -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
############################################
......
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