diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-02-23 13:31:49 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-02-23 13:31:49 +0200 |
commit | 53ae72567dfd284b395afb0539d5ef4b7a208b05 (patch) | |
tree | 82d05bc65d20901386bb3b866ac5320174385275 /abuild.in | |
parent | ad46156cc733e30eeb864573a7c2b3300b4ba465 (diff) | |
download | abuild-53ae72567dfd284b395afb0539d5ef4b7a208b05.tar.gz abuild-53ae72567dfd284b395afb0539d5ef4b7a208b05.tar.bz2 abuild-53ae72567dfd284b395afb0539d5ef4b7a208b05.tar.xz abuild-53ae72567dfd284b395afb0539d5ef4b7a208b05.zip |
abuild: fix setting build-base properly for cross-create/cross-build
Diffstat (limited to 'abuild.in')
-rw-r--r-- | abuild.in | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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" |