summaryrefslogtreecommitdiffstats
path: root/functions.sh.in
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-07-22 13:10:40 +0300
committerTimo Teräs <timo.teras@iki.fi>2016-07-23 06:20:00 +0000
commit42738f43d4215a09e1a054a065813c3bb88e22bd (patch)
tree1d4a5decb70e80ce319fa9617fddff8338e3925f /functions.sh.in
parent8946d01ed7f0891711fe62a93d752355c0b4fb98 (diff)
downloadabuild-42738f43d4215a09e1a054a065813c3bb88e22bd.tar.bz2
abuild-42738f43d4215a09e1a054a065813c3bb88e22bd.tar.xz
default to host gcc's machine for CBUILD
Diffstat (limited to 'functions.sh.in')
-rw-r--r--functions.sh.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions.sh.in b/functions.sh.in
index 1ba2d14..9c0cc57 100644
--- a/functions.sh.in
+++ b/functions.sh.in
@@ -86,7 +86,8 @@ readconfig() {
PACKAGER=${_PACKAGER-$PACKAGER}
USE_COLORS=${_USE_COLORS-$USE_COLORS}
- [ -z "$CBUILD" ] && CBUILD="$CHOST"
+ [ -z "$CBUILD" ] && CBUILD="$(gcc -dumpmachine)"
+ [ -z "$CHOST" ] && CHOST="$CBUILD"
[ -z "$CTARGET" ] && CTARGET="$CHOST"
[ -z "$CARCH" ] && CARCH="$(hostspec_to_arch $CHOST)"
[ -z "$CLIBC" ] && CLIBC="$(hostspec_to_libc $CHOST)"