Commit d9c1450a authored by thomie's avatar thomie Committed by Ben Gamari

Build system: use stage0 to build dll-split

When cross-compiling ghc itself, this prevents:

  "dll-split: cannot execute binary file: Exec format error"

Test Plan:
   * ./configure --target=arm-linux-gnueabihf
   * DYNAMIC_GHC_PROGRAMS=YES
   * Stage1Only=NO

Reviewers: rwbarton, bgamari, austin

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D1430
parent 22080113
......@@ -524,7 +524,6 @@ $(foreach pkg,$(PACKAGES_STAGE1),$(eval $(call fixed_pkg_dep,$(pkg),dist-install
# eachother, so we can configure them in parallel.
utils/ghc-pwd/dist-install/package-data.mk: $(fixed_pkg_prev)
utils/ghc-cabal/dist-install/package-data.mk: $(fixed_pkg_prev)
utils/dll-split/dist-install/package-data.mk: $(fixed_pkg_prev)
utils/hpc/dist-install/package-data.mk: $(fixed_pkg_prev)
utils/ghc-pkg/dist-install/package-data.mk: $(fixed_pkg_prev)
utils/hsc2hs/dist-install/package-data.mk: $(fixed_pkg_prev)
......
......@@ -15,4 +15,9 @@ utils/dll-split_PACKAGE = dll-split
utils/dll-split_dist-install_PROGNAME = dll-split
utils/dll-split_dist-install_INSTALL = NO
utils/dll-split_dist-install_INSTALL_INPLACE = YES
$(eval $(call build-prog,utils/dll-split,dist-install,1))
# Use the stage0 instead of the stage1 compiler to build dll-split, to
# prevent: "dll-split: cannot execute binary file: Exec format error".
# Programs built with the stage1 compiler can only run on TARGET
# architecture, whereas dll-split is used during the GHC build process (see
# rules/build-package-way.mk) on the BUILD (=HOST) architectue.
$(eval $(call build-prog,utils/dll-split,dist-install,0))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment