Commit 32a5ba99 authored by Fangrui Song's avatar Fangrui Song Committed by Sergei Trofimovich

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/34Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
parent f0751d9b
......@@ -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
......
......@@ -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
......
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