AlmaLinux changes: AlmaLinux change: Use the correct architecture in x86_64_v2
This commit is contained in:
parent
dbe98a89bc
commit
2e8dc656ff
@ -42,6 +42,7 @@
|
||||
-Cdebuginfo=%rustflags_debuginfo
|
||||
-Ccodegen-units=%rustflags_codegen_units
|
||||
-Cstrip=none
|
||||
%[0%{?x86_64_v2} ? "-Ctarget_cpu=x86-64-v2" : ""]
|
||||
%{expr:0%{?_include_frame_pointers} && ("%{_arch}" != "ppc64le" && "%{_arch}" != "s390x" && "%{_arch}" != "i386") ? "-Cforce-frame-pointers=yes" : ""}
|
||||
%[0%{?_package_note_status} ? "-Clink-arg=%_package_note_flags" : ""]
|
||||
}
|
||||
@ -253,4 +254,3 @@ set -euo pipefail\
|
||||
> cargo-vendor.txt \
|
||||
}\
|
||||
)
|
||||
|
||||
|
17
rust.spec
17
rust.spec
@ -186,6 +186,8 @@ Patch100: rustc-1.80.0-disable-libssh2.patch
|
||||
arch = "powerpc64le"
|
||||
elseif arch == "riscv64" then
|
||||
arch = "riscv64gc"
|
||||
elseif arch == "x86_64_v2" then
|
||||
arch = "x86_64"
|
||||
end
|
||||
return arch.."-unknown-linux-"..abi
|
||||
end}
|
||||
@ -748,6 +750,21 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
|
||||
print(env)
|
||||
end}
|
||||
|
||||
%ifarch x86_64_v2
|
||||
%global rustc_target_cpus %{lua: do
|
||||
local fedora = tonumber(rpm.expand("0%{?fedora}"))
|
||||
local rhel = tonumber(rpm.expand("0%{?rhel}"))
|
||||
local env =
|
||||
" RUSTC_TARGET_CPU_X86_64=x86-64-v2"
|
||||
.. " RUSTC_TARGET_CPU_PPC64LE=" .. ((rhel >= 9) and "pwr9" or "pwr8")
|
||||
.. " RUSTC_TARGET_CPU_S390X=" ..
|
||||
((rhel >= 9) and "z14" or (rhel == 8 or fedora >= 38) and "z13" or
|
||||
(fedora >= 26) and "zEC12" or (rhel == 7) and "z196" or "z10")
|
||||
print(env)
|
||||
end}
|
||||
%endif
|
||||
|
||||
|
||||
# Set up shared environment variables for build/install/check.
|
||||
# *_USE_PKG_CONFIG=1 convinces *-sys crates to use the system library.
|
||||
%global rust_env %{shrink:
|
||||
|
Loading…
Reference in New Issue
Block a user