summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-11-12 02:00:43 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-15 10:18:32 -0500
commitb679721a097161315b47c0f186ff72ec84c1389c (patch)
treed8847ee9f0772a5fdfed55369a2e414ea863fd2b
parent25d36c3178945d926f936ee32e57894d1743063c (diff)
downloadhaskell-b679721a097161315b47c0f186ff72ec84c1389c.tar.gz
Delete dead code knobs for building GHC itself
As GHC has become target agnostic, we've left behind some now-useless logic in both build systems.
-rw-r--r--compiler/ghc.cabal.in25
-rw-r--r--compiler/ghc.mk58
-rw-r--r--ghc/ghc.mk3
-rw-r--r--hadrian/src/Settings/Packages.hs6
4 files changed, 0 insertions, 92 deletions
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index 46b0752491..750dc0389d 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -39,21 +39,6 @@ Flag internal-interpreter
Default: False
Manual: True
-Flag stage1
- Description: Is this stage 1?
- Default: False
- Manual: True
-
-Flag stage2
- Description: Is this stage 2?
- Default: False
- Manual: True
-
-Flag stage3
- Description: Is this stage 3?
- Default: False
- Manual: True
-
Flag terminfo
Description: Build GHC with terminfo support on non-Windows platforms.
Default: True
@@ -109,7 +94,6 @@ Library
if flag(internal-interpreter)
CPP-Options: -DHAVE_INTERNAL_INTERPRETER
- Include-Dirs: ../rts/dist-install/build @FFIIncludeDir@
-- if no dynamic system linker is available, don't try DLLs.
if flag(dynamic-system-linker)
@@ -148,15 +132,6 @@ Library
-- as it's magic.
GHC-Options: -this-unit-id ghc
- if flag(stage1)
- Include-Dirs: stage1
- else
- if flag(stage2)
- Include-Dirs: stage2
- else
- if flag(stage3)
- Include-Dirs: stage2
-
c-sources:
cbits/cutils.c
cbits/genSym.c
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index c35c12706b..bba143c801 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -16,19 +16,8 @@
# The 'echo' commands simply spit the values of various make variables
# into Config.hs, whence they can be compiled and used by GHC itself
-# This is just to avoid generating a warning when generating deps
-# involving RtsFlags.h
-compiler_stage1_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES
-compiler_stage2_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES
-compiler_stage3_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES
-
compiler_stage1_C_FILES_NODEPS = compiler/cbits/cutils.c
-# This package doesn't pass the Cabal checks because include-dirs
-# points outside the source directory. This isn't a real problem, so
-# we just skip the check.
-compiler_NO_CHECK = YES
-
# We need to decrement the 1-indexed compiler stage to be the 0-indexed stage
# we use everwhere else.
dec1 = 0
@@ -41,11 +30,6 @@ dec3 = 2
ifneq "$(BINDIST)" "YES"
$(foreach n,1 2 3, \
- $(eval compiler/stage$n/package-data.mk : $(includes_$(dec$n)_H_PLATFORM)) \
- $(eval compiler/stage$n/package-data.mk : $(includes_$(dec$n)_H_CONFIG)) \
- )
-
-$(foreach n,1 2 3, \
$(eval compiler/stage$n/package-data.mk : compiler/stage$n/build/GHC/Settings/Config.hs) \
$(eval compiler/stage$n/build/GHC/Platform/Constants.o: compiler/stage$n/build/GHC/Platform/Constants.hs) \
)
@@ -183,34 +167,15 @@ $(eval $(call preprocessCompilerFiles,3))
# -----------------------------------------------------------------------------
# Configuration
-compiler_stage1_CONFIGURE_OPTS += --flags=stage1
-compiler_stage2_CONFIGURE_OPTS += --flags=stage2
-compiler_stage3_CONFIGURE_OPTS += --flags=stage3
-
ifeq "$(GhcWithInterpreter)" "YES"
compiler_stage2_CONFIGURE_OPTS += --flags=internal-interpreter
-# Should the debugger commands be enabled?
-ifeq "$(GhciWithDebugger)" "YES"
-compiler_stage2_CONFIGURE_OPTS += --ghc-option=-DDEBUGGER
-endif
-
endif
ifeq "$(TargetOS_CPP)" "openbsd"
compiler_CONFIGURE_OPTS += --ld-options=-E
endif
-ifeq "$(GhcUnregisterised)" "NO"
-else
-compiler_CONFIGURE_OPTS += --ghc-option=-DNO_REGS
-endif
-
-ifneq "$(GhcWithSMP)" "YES"
-compiler_CONFIGURE_OPTS += --ghc-option=-DNOSMP
-compiler_CONFIGURE_OPTS += --ghc-option=-optc-DNOSMP
-endif
-
ifeq "$(WITH_TERMINFO)" "NO"
compiler_stage2_CONFIGURE_OPTS += --flags=-terminfo
endif
@@ -311,16 +276,6 @@ compiler_stage3_CONFIGURE_OPTS += --disable-library-for-ghci
# after build-package, because that sets compiler_stage1_HC_OPTS:
-$(foreach n,1 2 3,\
- $(eval compiler_stage$n_CPP_OPTS += $$(addprefix -I,$$(BUILD_$(dec$n)_INCLUDE_DIRS))))
-compiler_CPP_OPTS += ${GhcCppOpts}
-
-# We add these paths to the Haskell compiler's #include search path list since
-# we must avoid #including files by paths relative to the source file as Hadrian
-# moves the build artifacts out of the source tree. See #8040.
-$(foreach n,1 2 3,\
- $(eval compiler_stage$n_HP_OPTS += $$(addprefix -I,$$(BUILD_$(dec$n)_INCLUDE_DIRS))))
-
ifeq "$(V)" "0"
compiler_stage1_HC_OPTS += $(filter-out -Rghc-timing,$(GhcHcOpts)) $(GhcStage1HcOpts)
compiler_stage2_HC_OPTS += $(filter-out -Rghc-timing,$(GhcHcOpts)) $(GhcStage2HcOpts)
@@ -333,10 +288,6 @@ endif
ifneq "$(BINDIST)" "YES"
-$(compiler_stage1_depfile_haskell) : # Headers come from bootstrap RTS
-$(compiler_stage2_depfile_haskell) : $(includes_1_H_CONFIG) $(includes_1_H_PLATFORM)
-$(compiler_stage3_depfile_haskell) : $(includes_2_H_CONFIG) $(includes_2_H_PLATFORM)
-
$(compiler_stage1_depfile_haskell) : $(COMPILER_INCLUDES_DEPS) $(PRIMOP_BITS_STAGE1)
$(compiler_stage2_depfile_haskell) : $(COMPILER_INCLUDES_DEPS) $(PRIMOP_BITS_STAGE2)
$(compiler_stage3_depfile_haskell) : $(COMPILER_INCLUDES_DEPS) $(PRIMOP_BITS_STAGE3)
@@ -348,13 +299,4 @@ $(foreach way,$(compiler_stage2_WAYS),\
$(foreach way,$(compiler_stage3_WAYS),\
compiler/stage3/build/PrimOp.$($(way)_osuf)) : $(PRIMOP_BITS_STAGE3)
-
-# GHC itself doesn't know about the above dependencies, so we have to
-# switch off the recompilation checker for that module:
-compiler/prelude/PrimOp_HC_OPTS += -fforce-recomp
-
-ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
-compiler/utils/Util_HC_OPTS += -DDYNAMIC_GHC_PROGRAMS
-endif
-
endif
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 6efe63cb0f..fcfb61f65a 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -38,9 +38,6 @@ ghc_stage1_UseGhcForCC = YES
ghc_stage2_UseGhcForCC = YES
ghc_stage3_UseGhcForCC = YES
-ghc_stage2_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES
-ghc_stage3_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES
-
ifeq "$(GhcDebugged)" "YES"
ghc_stage1_MORE_HC_OPTS += -debug
ghc_stage2_MORE_HC_OPTS += -debug
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs
index 36fcbb228a..6099b66055 100644
--- a/hadrian/src/Settings/Packages.hs
+++ b/hadrian/src/Settings/Packages.hs
@@ -55,12 +55,6 @@ packageArgs = do
, builder (Cabal Setup) ? mconcat
[ arg "--disable-library-for-ghci"
, anyTargetOs ["openbsd"] ? arg "--ld-options=-E"
- , flag GhcUnregisterised ? arg "--ghc-option=-DNO_REGS"
- , notM targetSupportsSMP ? arg "--ghc-option=-DNOSMP"
- , notM targetSupportsSMP ? arg "--ghc-option=-optc-DNOSMP"
- , ghcWithInterpreter ?
- ghciWithDebugger <$> flavour ?
- notStage0 ? arg "--ghc-option=-DDEBUGGER"
, ghcProfiled <$> flavour ?
notStage0 ? arg "--ghc-pkg-option=--force" ]