summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-11-08 00:19:55 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-08 00:54:05 +0100
commitd9c1450a8e2f4af6a8347f64ba2cee98304dbe27 (patch)
tree5e5b41d81c6e0e2b07946dbf77ef6520dd30c75b
parent22080113f02f6644e2a0e3ce8adb1502346ab3b4 (diff)
downloadhaskell-d9c1450a8e2f4af6a8347f64ba2cee98304dbe27.tar.gz
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
-rw-r--r--ghc.mk1
-rw-r--r--utils/dll-split/ghc.mk7
2 files changed, 6 insertions, 2 deletions
diff --git a/ghc.mk b/ghc.mk
index aaf7d003dd..5e74b7b01b 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -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)
diff --git a/utils/dll-split/ghc.mk b/utils/dll-split/ghc.mk
index 3d3e9da883..27e11bd9a2 100644
--- a/utils/dll-split/ghc.mk
+++ b/utils/dll-split/ghc.mk
@@ -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))