From 43c5cbd0319219fc9f3123d52d4cdf6f9c37b9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Thu, 20 Jun 2024 00:56:16 +0300 Subject: [PATCH] Fix loongarch build --- cpufeatures/Cargo.toml | 8 ++++---- cpufeatures/src/loongarch64.rs | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cpufeatures/Cargo.toml b/cpufeatures/Cargo.toml index a65f452e..ff2c2329 100644 --- a/cpufeatures/Cargo.toml +++ b/cpufeatures/Cargo.toml @@ -15,13 +15,13 @@ edition = "2018" readme = "README.md" [target.'cfg(all(target_arch = "aarch64", target_vendor = "apple"))'.dependencies] -libc = "0.2.149" +libc = "0.2.155" [target.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.dependencies] -libc = "0.2.149" +libc = "0.2.155" [target.'cfg(all(target_arch = "loongarch64", target_os = "linux"))'.dependencies] -libc = "0.2.149" +libc = "0.2.155" [target.aarch64-linux-android.dependencies] -libc = "0.2.149" +libc = "0.2.155" diff --git a/cpufeatures/src/loongarch64.rs b/cpufeatures/src/loongarch64.rs index 51398d74..077cc7c6 100644 --- a/cpufeatures/src/loongarch64.rs +++ b/cpufeatures/src/loongarch64.rs @@ -79,20 +79,20 @@ __expand_check_macro! { pub mod hwcaps { use libc::c_ulong; - pub const CPUCFG: c_ulong = libc::HWCAP_CPUCFG; - pub const LAM: c_ulong = libc::HWCAP_LAM; - pub const UAL: c_ulong = libc::HWCAP_UAL; - pub const FPU: c_ulong = libc::HWCAP_FPU; - pub const LSX: c_ulong = libc::HWCAP_LSX; - pub const LASX: c_ulong = libc::HWCAP_LASX; - pub const CRC32: c_ulong = libc::HWCAP_CRC32; - pub const COMPLEX: c_ulong = libc::HWCAP_COMPLEX; - pub const CRYPTO: c_ulong = libc::HWCAP_CRYPTO; - pub const LVZ: c_ulong = libc::HWCAP_LVZ; - pub const LBT_X86: c_ulong = libc::HWCAP_LBT_X86; - pub const LBT_ARM: c_ulong = libc::HWCAP_LBT_ARM; - pub const LBT_MIPS: c_ulong = libc::HWCAP_LBT_MIPS; - pub const PTW: c_ulong = libc::HWCAP_PTW; + pub const CPUCFG: c_ulong = libc::HWCAP_LOONGARCH_CPUCFG; + pub const LAM: c_ulong = libc::HWCAP_LOONGARCH_LAM; + pub const UAL: c_ulong = libc::HWCAP_LOONGARCH_UAL; + pub const FPU: c_ulong = libc::HWCAP_LOONGARCH_FPU; + pub const LSX: c_ulong = libc::HWCAP_LOONGARCH_LSX; + pub const LASX: c_ulong = libc::HWCAP_LOONGARCH_LASX; + pub const CRC32: c_ulong = libc::HWCAP_LOONGARCH_CRC32; + pub const COMPLEX: c_ulong = libc::HWCAP_LOONGARCH_COMPLEX; + pub const CRYPTO: c_ulong = libc::HWCAP_LOONGARCH_CRYPTO; + pub const LVZ: c_ulong = libc::HWCAP_LOONGARCH_LVZ; + pub const LBT_X86: c_ulong = libc::HWCAP_LOONGARCH_LBT_X86; + pub const LBT_ARM: c_ulong = libc::HWCAP_LOONGARCH_LBT_ARM; + pub const LBT_MIPS: c_ulong = libc::HWCAP_LOONGARCH_LBT_MIPS; + pub const PTW: c_ulong = libc::HWCAP_LOONGARCH_PTW; } // On other targets, runtime CPU feature detection is unavailable