diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-01-16 14:18:21 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-01-16 14:18:21 +0000 |
commit | b06c1ebc2cf63ee2703c35b6adfea9463e6fee7f (patch) | |
tree | 01db39f9b44b7ccfb90adb22878c93c256e68924 /rules/build-package-data.mk | |
parent | f77291d60f33fe601dbe0ff94b0192c5cd4ad6b5 (diff) | |
download | haskell-b06c1ebc2cf63ee2703c35b6adfea9463e6fee7f.tar.gz |
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.
Diffstat (limited to 'rules/build-package-data.mk')
-rw-r--r-- | 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 2c7b8532d7..86eae14477 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 |