From: DongHun Kwak Date: Wed, 5 Apr 2023 01:18:38 +0000 (+0900) Subject: Add cpufeatures X-Git-Tag: accepted/tizen/rust/20231016.020732~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c70a483b364b21f7c6bec5a5452dd701051ae8ff;p=platform%2Fupstream%2Frust-aes.git Add cpufeatures --- diff --git a/packaging/rust-aes.spec b/packaging/rust-aes.spec index 0d0ea3e..9d17c47 100644 --- a/packaging/rust-aes.spec +++ b/packaging/rust-aes.spec @@ -28,6 +28,7 @@ BuildRequires: rust-zeroize Requires: rust-cfg-if Requires: rust-cipher +Requires: rust-cpufeatures # ========================================================== # dev-dependencies @@ -48,12 +49,16 @@ cp %{SOURCE1} . # crate-type : dylib, proc-macro, cdylib, bin, etc. # ========================================================== %build +%ifarch %{ix86} aarch64 x86_64 +export _RUSTC_EXTERN_PACKAGES_="--extern cpufeatures=%{_rust_dylibdir}/libcpufeatures.so" +%endif %{rustc_std_build} --crate-type=dylib \ --crate-name=%{real_crate_name} \ %{?rustc_edition:--edition=%{rustc_edition}} \ - %rust_dylib_extern cipher \ - %rust_dylib_extern cfg_if \ --cfg='feature="hazmat"' \ + %rust_dylib_extern cfg_if \ + %rust_dylib_extern cipher \ + $_RUSTC_EXTERN_PACKAGES_ \ ./src/lib.rs # ==========================================================