build-sys: default to host vendor for rust target triple
This fixes docker-test@alpine, which uses "alpine" vendor. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Link: https://lore.kernel.org/r/20251007134558.251670-1-marcandre.lureau@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9c40c1ff97
commit
2438f18ee0
1 changed files with 7 additions and 6 deletions
13
configure
vendored
13
configure
vendored
|
|
@ -1216,8 +1216,9 @@ fi
|
|||
if test "$rust" != disabled && test -z "$rust_target_triple"; then
|
||||
# arch and os generally matches between meson and rust
|
||||
rust_arch=$host_arch
|
||||
# default to host vendor
|
||||
rust_vendor=$(echo "$rust_host_triple" | cut -d'-' -f2)
|
||||
rust_os=$host_os
|
||||
rust_machine=unknown
|
||||
rust_osvariant=
|
||||
|
||||
# tweak rust_os if needed; also, machine and variant depend on the OS
|
||||
|
|
@ -1225,7 +1226,7 @@ if test "$rust" != disabled && test -z "$rust_target_triple"; then
|
|||
case "$host_os" in
|
||||
darwin)
|
||||
# e.g. aarch64-apple-darwin
|
||||
rust_machine=apple
|
||||
rust_vendor=apple
|
||||
;;
|
||||
|
||||
linux)
|
||||
|
|
@ -1273,13 +1274,13 @@ EOF
|
|||
;;
|
||||
|
||||
sunos)
|
||||
rust_machine=pc
|
||||
rust_vendor=pc
|
||||
rust_os=solaris
|
||||
;;
|
||||
|
||||
windows)
|
||||
# e.g. aarch64-pc-windows-gnullvm, x86_64-pc-windows-gnu (MSVC not supported)
|
||||
rust_machine=pc
|
||||
rust_vendor=pc
|
||||
if test "$host_arch" = aarch64; then
|
||||
rust_osvariant=gnullvm
|
||||
else
|
||||
|
|
@ -1310,7 +1311,7 @@ EOF
|
|||
sparc64)
|
||||
if test "$rust_os" = solaris; then
|
||||
rust_arch=sparcv9
|
||||
rust_machine=sun
|
||||
rust_vendor=sun
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
@ -1324,7 +1325,7 @@ EOF
|
|||
# e.g. aarch64-linux-android
|
||||
rust_target_triple=$rust_arch-$rust_os-$rust_osvariant
|
||||
else
|
||||
rust_target_triple=$rust_arch-$rust_machine-$rust_os${rust_osvariant:+-$rust_osvariant}
|
||||
rust_target_triple=$rust_arch-$rust_vendor-$rust_os${rust_osvariant:+-$rust_osvariant}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue