From: Marc-André Lureau Date: Tue, 7 Oct 2025 13:45:58 +0000 (+0400) Subject: build-sys: default to host vendor for rust target triple X-Git-Tag: v10.2.0-rc1~71^2~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2438f18ee01108ead65be81be056e5a5da69120c;p=thirdparty%2Fqemu.git 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 Link: https://lore.kernel.org/r/20251007134558.251670-1-marcandre.lureau@redhat.com Signed-off-by: Paolo Bonzini --- 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