diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2017-09-09 17:37:03 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2017-09-09 17:59:34 +0200 |
commit | 838a10fcad9168895b49b4709056b549f2888860 (patch) | |
tree | 396836b5f0974f1b5e598b7dc5f841e3e2b2f451 /utils/ghc-cabal | |
parent | 346e562adffd44edd8c31328c0280543d7dd75c1 (diff) | |
download | haskell-838a10fcad9168895b49b4709056b549f2888860.tar.gz |
Retire cabal_macros_boot.h hack
I originally introduced this hack 3 years ago in
b0379819e46796047c1574a6abccf186afd27afa, and finally we can
retire it because starting with GHC 8.0 (which is the minimum
required version to bootstrap GHC 8.4) these macros are generated
natively by GHC.
Diffstat (limited to 'utils/ghc-cabal')
-rw-r--r-- | utils/ghc-cabal/cabal_macros_boot.h | 40 | ||||
-rw-r--r-- | utils/ghc-cabal/ghc.mk | 9 |
2 files changed, 2 insertions, 47 deletions
diff --git a/utils/ghc-cabal/cabal_macros_boot.h b/utils/ghc-cabal/cabal_macros_boot.h deleted file mode 100644 index 3b130e844c..0000000000 --- a/utils/ghc-cabal/cabal_macros_boot.h +++ /dev/null @@ -1,40 +0,0 @@ -/* defines a few MIN_VERSION_...() macros used by some of the bootstrap packages */ - -#if __GLASGOW_HASKELL__ >= 800 -/* macros are generated accurately by GHC on the fly */ -#elif __GLASGOW_HASKELL__ >= 711 -/* package base-4.9.0.0 */ -# define MIN_VERSION_base(major1,major2,minor) (\ - (major1) < 4 || \ - (major1) == 4 && (major2) < 9 || \ - (major1) == 4 && (major2) == 9 && (minor) <= 0) -/* package bytestring-0.10.8 */ -# define MIN_VERSION_bytestring(major1,major2,minor) (\ - (major1) < 0 || \ - (major1) == 0 && (major2) < 10 || \ - (major1) == 0 && (major2) == 10 && (minor) <= 8) - -#elif __GLASGOW_HASKELL__ >= 709 -/* package base-4.8.0.0 */ -# define MIN_VERSION_base(major1,major2,minor) (\ - (major1) < 4 || \ - (major1) == 4 && (major2) < 8 || \ - (major1) == 4 && (major2) == 8 && (minor) <= 0) -/* package bytestring-0.10.6 */ -# define MIN_VERSION_bytestring(major1,major2,minor) (\ - (major1) < 0 || \ - (major1) == 0 && (major2) < 10 || \ - (major1) == 0 && (major2) == 10 && (minor) <= 6) - -#elif __GLASGOW_HASKELL__ >= 707 -/* package base-4.7.0 */ -# define MIN_VERSION_base(major1,major2,minor) (\ - (major1) < 4 || \ - (major1) == 4 && (major2) < 7 || \ - (major1) == 4 && (major2) == 7 && (minor) <= 0) -/* package bytestring-0.10.4 */ -# define MIN_VERSION_bytestring(major1,major2,minor) (\ - (major1) < 0 || \ - (major1) == 0 && (major2) < 10 || \ - (major1) == 0 && (major2) == 10 && (minor) <= 4) -#endif diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index eeae8a715b..e0d2afe3f6 100644 --- a/utils/ghc-cabal/ghc.mk +++ b/utils/ghc-cabal/ghc.mk @@ -19,13 +19,9 @@ CABAL_VERSION := $(subst .,$(comma),$(CABAL_DOTTED_VERSION)) CABAL_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)" # Starting with GHC 8.0 we make use of GHC's native ability to -# generate MIN_VERSION_<pkgname>() CPP macros (rather than relying on -# the fragile `cabal_macros_boot.h` hack). The generation of those +# generate MIN_VERSION_<pkgname>() CPP macros. The generation of those # macros is triggered by `-hide-all-packages`, so we have to explicitly -# enumerate all packages we need in scope. In order to simplify the logic, -# we pass `-hide-all-packages` also to GHCs < 8, and we include -# `cabal_macros_boot.h` also for GHC >= 8 (in which case it becomes a -# dummy include that doesn't contribute any macro definitions). +# enumerate all packages we need in scope. ifeq "$(Windows_Host)" "YES" CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory Win32 else @@ -68,7 +64,6 @@ $(ghc-cabal_DIST_BINARY): $(CABAL_LEXER_DEP) utils/ghc-cabal/Main.hs $(TOUCH_DEP -DCABAL_VERSION=$(CABAL_VERSION) \ -DCABAL_PARSEC \ -DBOOTSTRAPPING \ - -optP-include -optPutils/ghc-cabal/cabal_macros_boot.h \ -odir bootstrapping \ -hidir bootstrapping \ $(CABAL_LEXER_DEP) \ |