From: Marc-André Lureau <marcandre.lureau@redhat.com>
This fixes docker-test@alpine, which uses "alpine" vendor.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
configure | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 78445cbb4b..a467f3a2e0 100755
--- a/configure
+++ b/configure
@@ -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
--
2.51.0