diff options
| author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-11-12 02:00:43 +0000 |
|---|---|---|
| committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-11-13 03:02:03 +0000 |
| commit | 4f4e8a6044ebd052e3500530a657bd203c677830 (patch) | |
| tree | fcdd3b90a0e5d398cb4ada9cd9d192c687e97ebc /compiler | |
| parent | 62d418f5cc6600f6c03fd9802e98d37490be0719 (diff) | |
| download | haskell-4f4e8a6044ebd052e3500530a657bd203c677830.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.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/ghc.cabal.in | 25 | ||||
| -rw-r--r-- | compiler/ghc.mk | 58 |
2 files changed, 0 insertions, 83 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 |
