summaryrefslogtreecommitdiff
path: root/utils/dll-split
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 /utils/dll-split
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
Diffstat (limited to 'utils/dll-split')
-rw-r--r--utils/dll-split/ghc.mk7
1 files changed, 6 insertions, 1 deletions
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))