summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat/Distribution/Compat/ReadP.hs3
-rw-r--r--compat/Distribution/Compat/TempFile.hs3
-rw-r--r--compat/Distribution/Compiler.hs3
-rw-r--r--compat/Distribution/GetOpt.hs3
-rw-r--r--compat/Distribution/InstalledPackageInfo.hs3
-rw-r--r--compat/Distribution/License.hs4
-rw-r--r--compat/Distribution/ModuleName.hs3
-rw-r--r--compat/Distribution/Package.hs3
-rw-r--r--compat/Distribution/ParseUtils.hs3
-rw-r--r--compat/Distribution/ReadE.hs3
-rw-r--r--compat/Distribution/Simple/Program.hs3
-rw-r--r--compat/Distribution/Simple/Utils.hs3
-rw-r--r--compat/Distribution/System.hs3
-rw-r--r--compat/Distribution/Text.hs3
-rw-r--r--compat/Distribution/Verbosity.hs3
-rw-r--r--compat/Distribution/Version.hs3
-rw-r--r--compat/Language/Haskell/Extension.hs3
-rw-r--r--compat/Makefile24
-rw-r--r--compat/System/FilePath.hs3
-rw-r--r--compat/System/FilePath/Internal.hs3
-rw-r--r--compat/System/FilePath/Posix.hs3
-rw-r--r--compat/System/FilePath/Windows.hs3
-rw-r--r--compat/compat.mk19
-rw-r--r--compiler/Makefile4
-rw-r--r--mk/config.mk.in4
-rw-r--r--mk/opts.mk5
-rw-r--r--mk/package.mk1
-rw-r--r--utils/ghc-pkg/Makefile2
28 files changed, 10 insertions, 113 deletions
diff --git a/compat/Distribution/Compat/ReadP.hs b/compat/Distribution/Compat/ReadP.hs
deleted file mode 100644
index 5fc69da3da..0000000000
--- a/compat/Distribution/Compat/ReadP.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compat/ReadP.hs"
--- dummy comment
diff --git a/compat/Distribution/Compat/TempFile.hs b/compat/Distribution/Compat/TempFile.hs
deleted file mode 100644
index 631eb76d05..0000000000
--- a/compat/Distribution/Compat/TempFile.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compat/TempFile.hs"
--- dummy comment
diff --git a/compat/Distribution/Compiler.hs b/compat/Distribution/Compiler.hs
deleted file mode 100644
index b5a2f68f1e..0000000000
--- a/compat/Distribution/Compiler.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Compiler.hs"
--- dummy comment
diff --git a/compat/Distribution/GetOpt.hs b/compat/Distribution/GetOpt.hs
deleted file mode 100644
index 7da2e30431..0000000000
--- a/compat/Distribution/GetOpt.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/GetOpt.hs"
--- dummy comment
diff --git a/compat/Distribution/InstalledPackageInfo.hs b/compat/Distribution/InstalledPackageInfo.hs
deleted file mode 100644
index 03f509216a..0000000000
--- a/compat/Distribution/InstalledPackageInfo.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/InstalledPackageInfo.hs"
--- dummy comment
diff --git a/compat/Distribution/License.hs b/compat/Distribution/License.hs
deleted file mode 100644
index 31b1b271a6..0000000000
--- a/compat/Distribution/License.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/License.hs"
-
--- dummy comment
diff --git a/compat/Distribution/ModuleName.hs b/compat/Distribution/ModuleName.hs
deleted file mode 100644
index 24db2a031e..0000000000
--- a/compat/Distribution/ModuleName.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ModuleName.hs"
--- dummy comment
diff --git a/compat/Distribution/Package.hs b/compat/Distribution/Package.hs
deleted file mode 100644
index d40171eec5..0000000000
--- a/compat/Distribution/Package.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Package.hs"
--- dummy comment
diff --git a/compat/Distribution/ParseUtils.hs b/compat/Distribution/ParseUtils.hs
deleted file mode 100644
index f5bf266a95..0000000000
--- a/compat/Distribution/ParseUtils.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ParseUtils.hs"
--- dummy comment
diff --git a/compat/Distribution/ReadE.hs b/compat/Distribution/ReadE.hs
deleted file mode 100644
index 821b902e36..0000000000
--- a/compat/Distribution/ReadE.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/ReadE.hs"
--- dummy comment
diff --git a/compat/Distribution/Simple/Program.hs b/compat/Distribution/Simple/Program.hs
deleted file mode 100644
index 86d2e1ac89..0000000000
--- a/compat/Distribution/Simple/Program.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Simple/Program.hs"
--- dummy comment
diff --git a/compat/Distribution/Simple/Utils.hs b/compat/Distribution/Simple/Utils.hs
deleted file mode 100644
index 004418da3e..0000000000
--- a/compat/Distribution/Simple/Utils.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Simple/Utils.hs"
--- dummy comment
diff --git a/compat/Distribution/System.hs b/compat/Distribution/System.hs
deleted file mode 100644
index 8cf5f26e65..0000000000
--- a/compat/Distribution/System.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/System.hs"
--- dummy comment
diff --git a/compat/Distribution/Text.hs b/compat/Distribution/Text.hs
deleted file mode 100644
index e84120381f..0000000000
--- a/compat/Distribution/Text.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Text.hs"
--- dummy comment
diff --git a/compat/Distribution/Verbosity.hs b/compat/Distribution/Verbosity.hs
deleted file mode 100644
index 2c18f5930f..0000000000
--- a/compat/Distribution/Verbosity.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Verbosity.hs"
--- dummy comment
diff --git a/compat/Distribution/Version.hs b/compat/Distribution/Version.hs
deleted file mode 100644
index 1140c03cbd..0000000000
--- a/compat/Distribution/Version.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Distribution/Version.hs"
--- dummy comment
diff --git a/compat/Language/Haskell/Extension.hs b/compat/Language/Haskell/Extension.hs
deleted file mode 100644
index 410a07b4d6..0000000000
--- a/compat/Language/Haskell/Extension.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "Cabal/Language/Haskell/Extension.hs"
--- dummy comment
diff --git a/compat/Makefile b/compat/Makefile
index a95e161c44..fb28e2c495 100644
--- a/compat/Makefile
+++ b/compat/Makefile
@@ -4,13 +4,6 @@ include $(TOP)/mk/boilerplate.mk
ALL_DIRS = \
Data \
Compat \
- Distribution \
- Distribution/Compat \
- Distribution/Simple \
- Language/Haskell \
- System \
- System/FilePath \
- System/Directory \
Trace/Hpc \
cbits
@@ -60,14 +53,6 @@ SRC_CC_OPTS += -D__GHC_PATCHLEVEL__=$(GhcPatchLevel)
# This module shouldn't be compiled itself, only #included into other files
EXCLUDED_SRCS += System/FilePath/Internal.hs
-ifneq "$(ghc_ge_607)" "YES"
-# GHC 6.3+ has Cabal, but we're replacing it:
-SRC_HC_OPTS += -ignore-package Cabal
-
-# only GHC 6.3+ has -ignore-package
-SRC_HC_OPTS += -ignore-package filepath
-endif
-
ifeq "$(ghc_ge_607)" "YES"
SRC_HC_OPTS += -package directory
SRC_HC_OPTS += -package pretty
@@ -76,15 +61,6 @@ endif
# Some explicit dependencies, needed because ghc -M can't discover the
# true dependencies of these stub files.
System/Directory/Internals.$(way_)o : $(FPTOOLS_TOP)/libraries/directory/System/Directory/Internals.hs
-Distribution/Compat/ReadP.$(way_) : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Compat/ReadP.hs
-Distribution/GetOpt.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/GetOpt.hs
-Distribution/InstalledPackageInfo.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/InstalledPackageInfo.hs
-Distribution/License.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/License.hs
-Distribution/Package.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Package.hs
-Distribution/ParseUtils.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/ParseUtils.hs
-Distribution/Compiler.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Compiler.hs
-Distribution/Version.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Version.hs
-Language/Haskell/Extension.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Language/Haskell/Extension.hs
Trace/Hpc/Mix.$(way_)o : $(FPTOOLS_TOP)/libraries/hpc/Trace/Hpc/Mix.hs
Trace/Hpc/Util.$(way_)o : $(FPTOOLS_TOP)/libraries/hpc/Trace/Hpc/Util.hs
Trace/Hpc/Tix.$(way_)o : $(FPTOOLS_TOP)/libraries/hpc/Trace/Hpc/Tix.hs
diff --git a/compat/System/FilePath.hs b/compat/System/FilePath.hs
deleted file mode 100644
index 749d727ab8..0000000000
--- a/compat/System/FilePath.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath.hs"
--- dummy comment
diff --git a/compat/System/FilePath/Internal.hs b/compat/System/FilePath/Internal.hs
deleted file mode 100644
index ce99a93a1e..0000000000
--- a/compat/System/FilePath/Internal.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Internal.hs"
--- dummy comment
diff --git a/compat/System/FilePath/Posix.hs b/compat/System/FilePath/Posix.hs
deleted file mode 100644
index 132f5cba91..0000000000
--- a/compat/System/FilePath/Posix.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Posix.hs"
--- dummy comment
diff --git a/compat/System/FilePath/Windows.hs b/compat/System/FilePath/Windows.hs
deleted file mode 100644
index 85a3214504..0000000000
--- a/compat/System/FilePath/Windows.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS -cpp #-}
-#include "filepath/System/FilePath/Windows.hs"
--- dummy comment
diff --git a/compat/compat.mk b/compat/compat.mk
index c2bfeb1833..00a3c9f4c5 100644
--- a/compat/compat.mk
+++ b/compat/compat.mk
@@ -14,9 +14,6 @@ SRC_HC_OPTS += -DUSING_COMPAT
SRC_HC_OPTS += -i$(GHC_COMPAT_DIR)
SRC_LD_OPTS += -L$(GHC_COMPAT_DIR) -lghccompat
-# Do *not* use the installed Cabal:
-SRC_HC_OPTS += -ignore-package Cabal
-
ifeq "$(ghc_ge_607)" "YES"
SRC_HC_OPTS += -package directory
SRC_HC_OPTS += -package pretty
@@ -37,22 +34,6 @@ endif
# from mkDependHS.
SRC_MKDEPENDHS_OPTS += \
-optdep--exclude-module=Compat.Unicode \
- -optdep--exclude-module=Distribution.Compat.FilePath \
- -optdep--exclude-module=Distribution.Compat.ReadP \
- -optdep--exclude-module=Distribution.Extension \
- -optdep--exclude-module=Distribution.GetOpt \
- -optdep--exclude-module=Distribution.InstalledPackageInfo \
- -optdep--exclude-module=Distribution.License \
- -optdep--exclude-module=Distribution.ModuleName \
- -optdep--exclude-module=Distribution.Package \
- -optdep--exclude-module=Distribution.ParseUtils \
- -optdep--exclude-module=Distribution.Compiler \
- -optdep--exclude-module=Distribution.Version \
- -optdep--exclude-module=Distribution.ReadE \
- -optdep--exclude-module=Distribution.Text \
- -optdep--exclude-module=System.FilePath \
- -optdep--exclude-module=System.FilePath.Posix \
- -optdep--exclude-module=System.FilePath.Windows \
-optdep--exclude-module=Trace.Hpc.Mix \
-optdep--exclude-module=Trace.Hpc.Tix \
-optdep--exclude-module=Trace.Hpc.Util
diff --git a/compiler/Makefile b/compiler/Makefile
index ce69bae2f2..5e503eac14 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -602,12 +602,8 @@ SRC_HC_OPTS += -package unix
PKG_DEPENDS += unix
endif
-# We use the Cabal package in stages 2/3 only; in stage 1 we're using
-# the libcompat library which provides the Cabal modules.
-ifneq "$(stage)" "1"
SRC_HC_OPTS += -package Cabal
PKG_DEPENDS += Cabal
-endif
# Ignore lang, to avoid potential clash with the Generics module if
# lang happens to be a dependency of some exposed package in the local
diff --git a/mk/config.mk.in b/mk/config.mk.in
index e19a1cdc30..3749b3eda8 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -884,6 +884,8 @@ GHC_STAGE1 = $(GHC_COMPILER_DIR)/stage1/ghc-inplace -no-user-package-conf
GHC_STAGE2 = $(GHC_COMPILER_DIR)/stage2/ghc-inplace -no-user-package-conf
GHC_STAGE3 = $(GHC_COMPILER_DIR)/stage3/ghc-inplace -no-user-package-conf
+BOOTSTRAPPING_CONF = $(FPTOOLS_TOP_ABS)/libraries/bootstrapping.conf
+
# NOTE: add -no-user-package-conf for stage 1-3 above, so that
# we avoid picking up any packages the user might happen to have
# installed for this GHC version. They are bound to be incompatible
@@ -912,6 +914,8 @@ else # not UseStage1 or BootingFromHc
HC = @WithHc@
MKDEPENDHS = $(GHC)
+BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS = -package-conf $(BOOTSTRAPPING_CONF)
+BOOTSTRAPPING_PACKAGE_CONF_MKDEPENDHS_OPTS = -package-conf $(BOOTSTRAPPING_CONF)
GhcVersion = @GhcVersion@
GhcPatchLevel = @GhcPatchLevel@
GhcMajVersion = @GhcMajVersion@
diff --git a/mk/opts.mk b/mk/opts.mk
index fe2d06066b..08ec4b60a2 100644
--- a/mk/opts.mk
+++ b/mk/opts.mk
@@ -60,7 +60,7 @@ endif
# All the standard gluing together, as in the comment right at the front
-HC_OPTS = $(SRC_HC_OPTS) $(WAY$(_way)_HC_OPTS) $($*_HC_OPTS) $(EXTRA_HC_OPTS)
+HC_OPTS = $(BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS) $(SRC_HC_OPTS) $(WAY$(_way)_HC_OPTS) $($*_HC_OPTS) $(EXTRA_HC_OPTS)
HC_POST_OPTS = $(SRC_HC_POST_OPTS) $(WAY$(_way)_HC_POST_OPTS) $($*_HC_POST_OPTS) $(EXTRA_HC_POST_OPTS)
HC_PRE_OPTS = $(SRC_HC_PRE_OPTS) $(WAY$(_way)_HC_PRE_OPTS) $($*_HC_PRE_OPTS) $(EXTRA_HC_PRE_OPTS)
@@ -95,7 +95,8 @@ LIT2HTML_OPTS = $(SRC_LIT2HTML_OPTS) $(WAY$(_way)_LIT2HTML_OPTS) $(EXTRA_LI
LIT2LATEX_OPTS = $(SRC_LIT2LATEX_OPTS) $(WAY$(_way)_LIT2LATEX_OPTS) $(EXTRA_LIT2LATEX_OPTS)
LIT2PGM_OPTS = $(SRC_LIT2PGM_OPTS) $(WAY$(_way)_LIT2PGM_OPTS) $(EXTRA_LIT2PGM_OPTS)
MKDEPENDC_OPTS = $(SRC_MKDEPENDC_OPTS) $(WAY$(_way)_MKDEPENDC_OPTS) $(EXTRA_MKDEPENDC_OPTS)
-MKDEPENDHS_OPTS = $(SRC_MKDEPENDHS_OPTS) $(WAY$(_way)_MKDEPENDHS_OPTS) \
+MKDEPENDHS_OPTS = $(BOOTSTRAPPING_PACKAGE_CONF_MKDEPENDHS_OPTS) \
+ $(SRC_MKDEPENDHS_OPTS) $(WAY$(_way)_MKDEPENDHS_OPTS) \
$(EXTRA_MKDEPENDHS_OPTS)
MKDEPENDLIT_OPTS = $(SRC_MKDEPENDLIT_OPTS) $(WAY$(_way)_MKDEPENDLIT_OPTS) \
$(EXTRA_MKDEPENDLIT_OPTS)
diff --git a/mk/package.mk b/mk/package.mk
index f17f9e03e5..44087aa1c0 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -120,6 +120,7 @@ SRC_HSC2HS_OPTS += -I.
ifneq "$(NO_SET_HC)" "YES"
HC = $(GHC_INPLACE)
+BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS =
endif
IGNORE_PACKAGE_FLAG = -package-name $(PACKAGE)-$(VERSION)
diff --git a/utils/ghc-pkg/Makefile b/utils/ghc-pkg/Makefile
index f35bbf9af5..adce82949b 100644
--- a/utils/ghc-pkg/Makefile
+++ b/utils/ghc-pkg/Makefile
@@ -33,6 +33,8 @@ ifeq "$(ghc_ge_607)" "YES"
SRC_HC_OPTS += -package containers
endif
+SRC_HC_OPTS += -package Cabal
+
# On Windows, ghc-pkg is a standalone program
# ($bindir/ghc-pkg.exe), whereas on Unix it needs a wrapper script
# to pass the appropriate flag to the real binary