From 780c767c07bebb74d01a060b9b6250d4989cbb2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Mon, 27 Feb 2017 15:08:04 +0000 Subject: testing/ghc: more fixes to cross-build --- testing/ghc/APKBUILD | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'testing/ghc/APKBUILD') diff --git a/testing/ghc/APKBUILD b/testing/ghc/APKBUILD index 31040fcea7..e2b7ecc29f 100644 --- a/testing/ghc/APKBUILD +++ b/testing/ghc/APKBUILD @@ -99,9 +99,13 @@ build() { cd "$builddir" local _ffi_inc=$(pkg-config libffi --cflags-only-I); _ffi_inc="${_ffi_inc%% }" local _ffi_lib=$(pkg-config libffi --libs-only-L); _ffi_lib="${_ffi_lib%% }" + + # NOTE: ghc build system requires host == build, and it ends up + # compiling the cross-compiler (stage1) and cross-compiling with + # that the native compiler (stage2) ./configure \ --build=$CBUILD \ - --host=$CHOST \ + --host=$CBUILD \ --target=$CTARGET \ --prefix=/usr \ --with-system-libffi \ @@ -143,6 +147,9 @@ package() { mv "$fn" "$_new" || return 1 fi done + # remove triplet prefix from settings -- the intention is + # that the native compiler will use native gcc/ld on the target + sed -ie "s|$CTARGET-||g" "$pkgdir"/usr/lib/${CTARGET}-ghc-$pkgver/settings || return 1 fi # Can't do a full strip on archives. -- cgit v1.2.3