functions.sh: use apk --print-arch for CARCH if gcc is missing
This commit is contained in:
parent
4f5b0a14bd
commit
5adf47c168
|
@ -125,6 +125,13 @@ readconfig() {
|
||||||
[ "$(arch_to_hostspec $CTARGET)" != "unknown" ] && CTARGET="$(arch_to_hostspec $CTARGET)"
|
[ "$(arch_to_hostspec $CTARGET)" != "unknown" ] && CTARGET="$(arch_to_hostspec $CTARGET)"
|
||||||
|
|
||||||
[ -z "$CARCH" ] && CARCH="$(hostspec_to_arch $CHOST)"
|
[ -z "$CARCH" ] && CARCH="$(hostspec_to_arch $CHOST)"
|
||||||
|
|
||||||
|
# use apk --print-arch for CARCH if gcc is missing
|
||||||
|
if [ "$CARCH" = "unknown" ]; then
|
||||||
|
local apk_arch="$(${APK:-apk} --print-arch 2>/dev/null)"
|
||||||
|
CARCH=${apk_arch:-unknown}
|
||||||
|
fi
|
||||||
|
|
||||||
[ -z "$CLIBC" ] && CLIBC="$(hostspec_to_libc $CHOST)"
|
[ -z "$CLIBC" ] && CLIBC="$(hostspec_to_libc $CHOST)"
|
||||||
[ -z "$CBUILD_ARCH" ] && CBUILD_ARCH="$(hostspec_to_arch $CBUILD)"
|
[ -z "$CBUILD_ARCH" ] && CBUILD_ARCH="$(hostspec_to_arch $CBUILD)"
|
||||||
[ -z "$CTARGET_ARCH" ] && CTARGET_ARCH="$(hostspec_to_arch $CTARGET)"
|
[ -z "$CTARGET_ARCH" ] && CTARGET_ARCH="$(hostspec_to_arch $CTARGET)"
|
||||||
|
|
Loading…
Reference in New Issue