summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2017-04-20 17:03:30 -0700
committerSergei Trofimovich <slyfox@gentoo.org>2017-04-21 22:32:22 +0100
commit32a5ba993de4a8c88d4738d7386ba8afbaa84e78 (patch)
tree93decfa56c97455603e9807560e430b5e4918785
parentf0751d9bedbe293af0dedecf63e65524fd4fda7f (diff)
downloadhaskell-32a5ba993de4a8c88d4738d7386ba8afbaa84e78.tar.gz
Build system: fix bindist for cross-build GHC
The change fixes case of installing cross-built GHC from bindist (BINDIST=YES) on TARGET. In this case we need to use TARGET tools in `INSTALLED_GHC{,_PKG}_REAL`. The original change is provided by Fangrui Song as pull request https://github.com/ghc/ghc/pull/34 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--ghc.mk2
-rw-r--r--mk/config.mk.in1
2 files changed, 2 insertions, 1 deletions
diff --git a/ghc.mk b/ghc.mk
index 8971f25981..d1dbb9eb4f 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -962,7 +962,7 @@ endif
INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d
-ifeq "$(CrossCompiling)" "YES"
+ifeq "$(BINDIST) $(CrossCompiling)" "NO YES"
# when installing ghc-stage2 we can't run target's
# 'ghc-pkg' and 'ghc-stage2' but those are needed for registration.
INSTALLED_GHC_REAL=$(TOP)/inplace/bin/ghc-stage1
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 1f7353c9bc..8901137f00 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -415,6 +415,7 @@ GhcRtsWithLibdw=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64),@UseLibdw@,
#
################################################################################
+BINDIST = NO
BIN_DIST_NAME = ghc-$(ProjectVersion)
BIN_DIST_PREP_DIR = bindistprep/$(BIN_DIST_NAME)
BIN_DIST_PREP_TAR = bindistprep/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar