[commit: ghc] master: When cross-compiling, pass --host to package configure scripts (b06c1eb)

Simon Marlow marlowsd at gmail.com
Wed Jan 16 15:38:33 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b06c1ebc2cf63ee2703c35b6adfea9463e6fee7f

>---------------------------------------------------------------

commit b06c1ebc2cf63ee2703c35b6adfea9463e6fee7f
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Wed Jan 16 14:18:21 2013 +0000

    When cross-compiling, pass --host to package configure scripts
    
    Otherwise the configure script for e.g. base doesn't know that we're
    cross-compiling, and fails trying to run an executable compiled by the
    C cross-compiler.

>---------------------------------------------------------------

 rules/build-package-data.mk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk
index 2c7b853..86eae14 100644
--- a/rules/build-package-data.mk
+++ b/rules/build-package-data.mk
@@ -70,6 +70,12 @@ ifneq "$$(GMP_LIB_DIRS)" ""
 $1_$2_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="$$(GMP_LIB_DIRS)"
 endif
 
+ifeq "$$(CrossCompiling)" "YES"
+$1_$2_CONFIGURE_OPTS += --configure-option=--host=$(TARGETPLATFORM)
+# We use different platform name conventions than autoconf expects,
+# but let's hope it doesn't cause problems.
+endif
+
 ifeq "$3" "0"
 $1_$2_CONFIGURE_OPTS += $$(BOOT_PKG_CONSTRAINTS)
 endif





More information about the ghc-commits mailing list