abuild: set CARCH and CLIBC always, guess from CHOST if not set
This commit is contained in:
parent
ad50945d80
commit
b48df6c575
32
abuild.in
32
abuild.in
|
@ -156,14 +156,32 @@ default_sanitycheck() {
|
|||
done
|
||||
|
||||
# check if CARCH, CBUILD, CHOST and CTARGET is set
|
||||
if [ -z "$CARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
i[0-9]86) suggestion=" (Suggestion: CARCH=x86)";;
|
||||
x86_64) suggestion=" (Suggestion: CARCH=x86_64)";;
|
||||
esac
|
||||
die "Please set CARCH in /etc/abuild.conf$suggestion"
|
||||
fi
|
||||
[ -z "$CHOST" ] && die "Please set CHOST in /etc/abuild.conf"
|
||||
[ -z "$CBUILD" ] && CBUILD="$CHOST"
|
||||
[ -z "$CTARGET" ] && CTARGET="$CHOST"
|
||||
|
||||
if [ -z "$CARCH" ]; then
|
||||
case "$CHOST" in
|
||||
arm*-*-*-*) CARCH="armel" ;;
|
||||
i[0-9]86-*-*-*) CARCH="x86" ;;
|
||||
x86_64-*-*-*) CARCH="x86_64" ;;
|
||||
*) die "Please fix CHOST, or set CARCH in abuild.conf"
|
||||
esac
|
||||
fi
|
||||
|
||||
# check CLIBC
|
||||
if [ -z "$CLIBC" ]; then
|
||||
if [ -z "$ALPINE_LIBC" ]; then
|
||||
case "$CHOST" in
|
||||
*-*-*-uclibc*) CLIBC="uclibc" ;;
|
||||
*-*-*-musl*) CLIBC="musl" ;;
|
||||
*-*-*-gnu*) CLIBC="eglibc" ;;
|
||||
*) CLIBC="uclibc" ;;
|
||||
esac
|
||||
else
|
||||
CLIBC="$ALPINE_LIBC"
|
||||
fi
|
||||
fi
|
||||
|
||||
for i in $install; do
|
||||
local n=${i%.*}
|
||||
|
|
Loading…
Reference in New Issue