[commit: ghc] master: Build system: use stage0 to build dll-split (d9c1450)
git at git.haskell.org
git at git.haskell.org
Sat Nov 7 23:54:29 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d9c1450a8e2f4af6a8347f64ba2cee98304dbe27/ghc
>---------------------------------------------------------------
commit d9c1450a8e2f4af6a8347f64ba2cee98304dbe27
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Sun Nov 8 00:19:55 2015 +0100
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
>---------------------------------------------------------------
d9c1450a8e2f4af6a8347f64ba2cee98304dbe27
ghc.mk | 1 -
utils/dll-split/ghc.mk | 7 ++++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ghc.mk b/ghc.mk
index aaf7d00..5e74b7b 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 3d3e9da..27e11bd 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))
More information about the ghc-commits
mailing list