From 53ae72567dfd284b395afb0539d5ef4b7a208b05 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Thu, 23 Feb 2017 13:31:49 +0200 Subject: abuild: fix setting build-base properly for cross-create/cross-build --- abuild.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/abuild.in b/abuild.in index 5c6f229..94844c3 100644 --- a/abuild.in +++ b/abuild.in @@ -60,6 +60,10 @@ error() { logcmd "ERROR: $pkgname: $1" } +cross_creating() { + test "$CHOST" != "$CTARGET" -a -n "$CBUILDROOT" +} + cross_compiling() { test "$CBUILD" != "$CHOST" -a -n "$CBUILDROOT" } @@ -1857,8 +1861,12 @@ builddeps() { msg "Analyzing dependencies..." local BUILD_BASE="" - if ! options_has toolchain; then - cross_compiling && BUILD_BASE="build-base-$CTARGET_ARCH" || BUILD_BASE="build-base" + if cross_creating; then + options_has toolchain || BUILD_BASE="build-base-$CTARGET_ARCH" + elif cross_compiling; then + BUILD_BASE="build-base-$CTARGET_ARCH" + else + BUILD_BASE="build-base" fi calcdeps "$BUILD_BASE" -- cgit v1.2.3-70-g09d2