diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-02-11 09:56:43 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-06-17 16:22:03 -0400 |
commit | aa9e7b7196f03f84579e3b4a09068c668cbe6ffb (patch) | |
tree | c4bf6673ea4298a4675b21c8b5dcbc205bfbb86f /ghc.mk | |
parent | 0f67e3447e5a0089b5348940d404ed876fddddfc (diff) | |
download | haskell-aa9e7b7196f03f84579e3b4a09068c668cbe6ffb.tar.gz |
Update `make` based build system
* replace integer-* package selection with ghc-bignum backend selection
Diffstat (limited to 'ghc.mk')
-rw-r--r-- | ghc.mk | 35 |
1 files changed, 14 insertions, 21 deletions
@@ -420,7 +420,7 @@ PACKAGES_STAGE0 += terminfo endif PACKAGES_STAGE1 += ghc-prim -PACKAGES_STAGE1 += $(INTEGER_LIBRARY) +PACKAGES_STAGE1 += ghc-bignum PACKAGES_STAGE1 += base PACKAGES_STAGE1 += filepath PACKAGES_STAGE1 += array @@ -451,6 +451,7 @@ PACKAGES_STAGE1 += parsec PACKAGES_STAGE1 += Cabal/Cabal PACKAGES_STAGE1 += ghc-compact PACKAGES_STAGE1 += ghc-heap +PACKAGES_STAGE1 += integer-gmp # compat library ifeq "$(HADDOCK_DOCS)" "YES" PACKAGES_STAGE1 += xhtml @@ -466,6 +467,15 @@ endif # and executables. This flag disables the latter. libraries/haskeline_CONFIGURE_OPTS += --flags=-examples +libraries/ghc-bignum_CONFIGURE_OPTS += -f $(BIGNUM_BACKEND) + +ifeq "$(BIGNUM_BACKEND)" "gmp" +GMP_ENABLED = YES +libraries/ghc-bignum_CONFIGURE_OPTS += --configure-option="--with-gmp" +else +GMP_ENABLED = NO +endif + PACKAGES_STAGE1 += stm PACKAGES_STAGE1 += exceptions PACKAGES_STAGE1 += haskeline @@ -605,21 +615,6 @@ libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs : $$(genprimopcode_I # Required so that Haddock documents the primops. libraries/ghc-prim_dist-install_EXTRA_HADDOCK_SRCS = libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs -# ---------------------------------------- -# Special magic for the integer package - -ifneq "$(CLEANING)" "YES" -ifeq "$(INTEGER_LIBRARY)" "integer-gmp" -libraries/base_dist-install_CONFIGURE_OPTS += --flags=integer-gmp -compiler_stage2_CONFIGURE_OPTS += --flags=integer-gmp -else ifeq "$(INTEGER_LIBRARY)" "integer-simple" -libraries/base_dist-install_CONFIGURE_OPTS += --flags=integer-simple -compiler_stage2_CONFIGURE_OPTS += --flags=integer-simple -else -$(error Unknown integer library: $(INTEGER_LIBRARY)) -endif -endif - # ----------------------------------------------------------------------------- # Include build instructions from all subdirs BUILD_DIRS += utils/mkdirhier @@ -656,7 +651,7 @@ BUILD_DIRS += $(patsubst %, libraries/%, $(PACKAGES_STAGE1)) BUILD_DIRS += $(patsubst %, libraries/%, $(filter-out $(PACKAGES_STAGE1),$(PACKAGES_STAGE0))) endif -BUILD_DIRS += libraries/integer-gmp/gmp +BUILD_DIRS += libraries/ghc-bignum/gmp BUILD_DIRS += utils/haddock BUILD_DIRS += utils/haddock/doc BUILD_DIRS += compiler @@ -702,9 +697,6 @@ ifeq "$(GhcWithInterpreter)" "NO" # runghc is just GHCi in disguise BUILD_DIRS := $(filter-out utils/runghc,$(BUILD_DIRS)) endif -ifneq "$(INTEGER_LIBRARY)" "integer-gmp" -BUILD_DIRS := $(filter-out libraries/integer-gmp/gmp,$(BUILD_DIRS)) -endif ifneq "$(CrossCompiling) $(Stage1Only)" "NO NO" # See Note [No stage2 packages when CrossCompiling or Stage1Only]. # See Note [Stage1Only vs stage=1] in mk/config.mk.in. @@ -1301,7 +1293,8 @@ sdist_%: .PHONY: clean -CLEAN_FILES += libraries/integer-gmp/include/HsIntegerGmp.h +CLEAN_FILES += libraries/ghc-bignum/include/ghc-gmp.h +CLEAN_FILES += libraries/ghc-bignum/include/HsIntegerGmp.h CLEAN_FILES += libraries/base/include/EventConfig.h CLEAN_FILES += mk/config.mk.old CLEAN_FILES += mk/project.mk.old |