Trim extra_targets on RHEL

Resolves: RHEL-41260
This commit is contained in:
Josh Stone 2024-07-25 16:54:21 -07:00
parent a80eac446a
commit bdc2be1e01

View File

@ -35,13 +35,18 @@ ExclusiveArch: %{rust_arches}
# NB: wasm32-wasi is being gradually replaced by wasm32-wasip1 # NB: wasm32-wasi is being gradually replaced by wasm32-wasip1
# https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets.html # https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets.html
%global wasm_targets wasm32-unknown-unknown wasm32-wasi wasm32-wasip1 %global wasm_targets wasm32-unknown-unknown wasm32-wasi wasm32-wasip1
%if 0%{?fedora} || 0%{?rhel} >= 10 %if 0%{?fedora}
%global extra_targets x86_64-unknown-none x86_64-unknown-uefi %global extra_targets x86_64-unknown-none x86_64-unknown-uefi
%endif %endif
%if 0%{?rhel} >= 10
%global extra_targets x86_64-unknown-none
%endif
%endif %endif
%ifarch aarch64 %ifarch aarch64
%if 0%{?fedora}
%global extra_targets aarch64-unknown-none-softfloat %global extra_targets aarch64-unknown-none-softfloat
%endif %endif
%endif
%global all_targets %{?mingw_targets} %{?wasm_targets} %{?extra_targets} %global all_targets %{?mingw_targets} %{?wasm_targets} %{?extra_targets}
%define target_enabled() %{lua: %define target_enabled() %{lua:
print(string.find(rpm.expand(" %{all_targets} "), rpm.expand(" %1 "), 1, true) or 0) print(string.find(rpm.expand(" %{all_targets} "), rpm.expand(" %1 "), 1, true) or 0)