mirror of
https://github.com/fluencelabs/musl
synced 2025-06-11 05:51:48 +00:00
improve configure's target arch matching
most notably, it was failing to match sh4-*, etc., but in general the explicit matching of hyphens for some archs was problematic because it failed to accept simply the musl-style arch name (without a gcc-style tuple) as an input. the original motivation of matching hyphens was to prevent incorrectly identifying a 64-bit arch as the corresponding 32-bit arch (e.g. mips* matching mips64) but this is easily fixed by simply checking (and for now, rejecting as unsupported) the relevant 64-bit archs.
This commit is contained in:
10
configure
vendored
10
configure
vendored
@ -222,14 +222,16 @@ printf "%s\n" "$target"
|
|||||||
# Convert to just ARCH
|
# Convert to just ARCH
|
||||||
#
|
#
|
||||||
case "$target" in
|
case "$target" in
|
||||||
|
# Catch these early to simplify matching for 32-bit archs
|
||||||
|
mips64*|powerpc64*) fail "$0: unsupported target \"$target\"" ;;
|
||||||
arm*) ARCH=arm ;;
|
arm*) ARCH=arm ;;
|
||||||
i?86*) ARCH=i386 ;;
|
i?86*) ARCH=i386 ;;
|
||||||
x86_64-x32*|x32*) ARCH=x32 ;;
|
x86_64-x32*|x32*) ARCH=x32 ;;
|
||||||
x86_64*) ARCH=x86_64 ;;
|
x86_64*) ARCH=x86_64 ;;
|
||||||
mips-*|mipsel-*) ARCH=mips ;;
|
mips*) ARCH=mips ;;
|
||||||
microblaze-*) ARCH=microblaze ;;
|
microblaze*) ARCH=microblaze ;;
|
||||||
powerpc-*) ARCH=powerpc ;;
|
powerpc*) ARCH=powerpc ;;
|
||||||
sh-*) ARCH=sh ;;
|
sh[1-9bel-]*|sh|superh*) ARCH=sh ;;
|
||||||
unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
|
unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
|
||||||
*) fail "$0: unknown or unsupported target \"$target\"" ;;
|
*) fail "$0: unknown or unsupported target \"$target\"" ;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user