Commit c20c6132 authored by Natanael Copa's avatar Natanael Copa

abuild: fix CARCH/CLIBC

We need set it in global scope as we need it even if we have not called
sanitycheck
parent 2760f35c
......@@ -161,22 +161,7 @@ default_sanitycheck() {
[ -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
case "$CHOST" in
*-*-*-uclibc*) CLIBC="uclibc" ;;
*-*-*-musl*) CLIBC="musl" ;;
*-*-*-gnu*) CLIBC="eglibc" ;;
*) CLIBC="uclibc" ;;
esac
die "Please fix CHOST, or set CARCH in abuild.conf"
fi
for i in $install; do
......@@ -1878,6 +1863,23 @@ repo=${repo##*/}
SRCDEST=${SRCDEST:-$startdir}
PKGDEST=${PKGDEST:-$startdir}
if [ -z "$CARCH" ]; then
case "$CHOST" in
arm*-*-*-*) CARCH="armel" ;;
i[0-9]86-*-*-*) CARCH="x86" ;;
x86_64-*-*-*) CARCH="x86_64" ;;
esac
fi
if [ -z "$CLIBC" ]; then
case "$CHOST" in
*-*-*-uclibc*) CLIBC="uclibc" ;;
*-*-*-musl*) CLIBC="musl" ;;
*-*-*-gnu*) CLIBC="eglibc" ;;
*) CLIBC="uclibc" ;;
esac
fi
cd "$startdir" || die
. "$APKBUILD"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment