diff --git a/add-loongarch64-support-for-libxcrypt.patch b/add-loongarch64-support-for-libxcrypt.patch new file mode 100644 index 0000000000000000000000000000000000000000..29b92693db17246e0a68c868dc49b27092d563f6 --- /dev/null +++ b/add-loongarch64-support-for-libxcrypt.patch @@ -0,0 +1,50 @@ +From 7144d8fdfe35d774198d0d2fde845a13ca6e32ad Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Tue, 7 Feb 2023 17:33:23 +0800 +Subject: [PATCH] add loongarch64 support for libxcrypt + +--- + lib/crypt-bcrypt.c | 2 +- + lib/libcrypt.map.in | 2 +- + lib/libcrypt.minver | 1 + + 3 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/lib/crypt-bcrypt.c b/lib/crypt-bcrypt.c +index 0c4106c..10c6e00 100644 +--- a/lib/crypt-bcrypt.c ++++ b/lib/crypt-bcrypt.c +@@ -52,7 +52,7 @@ + #if INCLUDE_bcrypt || INCLUDE_bcrypt_a || INCLUDE_bcrypt_x || INCLUDE_bcrypt_y + + #if defined(__i386__) || defined(__x86_64__) || \ +- defined(__alpha__) || defined(__hppa__) || defined(__sw_64__) ++ defined(__alpha__) || defined(__hppa__) || defined(__sw_64__) || defined(__loongarch64) + #define BF_SCALE 1 + #else + #define BF_SCALE 0 +diff --git a/lib/libcrypt.map.in b/lib/libcrypt.map.in +index e746a1b..97a855b 100644 +--- a/lib/libcrypt.map.in ++++ b/lib/libcrypt.map.in +@@ -42,5 +42,5 @@ fcrypt - GLIBC_2.0 + # libcrypt.minver. The ordering is left to right, top to bottom. + %chain GLIBC_2.0 GLIBC_2.2 GLIBC_2.2.1 GLIBC_2.2.2 GLIBC_2.2.5 GLIBC_2.2.6 + %chain GLIBC_2.3 GLIBC_2.4 GLIBC_2.12 GLIBC_2.16 GLIBC_2.17 GLIBC_2.18 +-%chain GLIBC_2.21 GLIBC_2.27 GLIBC_2.29 GLIBC_2.32 GLIBC_2.33 ++%chain GLIBC_2.21 GLIBC_2.27 GLIBC_2.29 GLIBC_2.32 GLIBC_2.33 GLIBC_2.34 + %chain OW_CRYPT_1.0 XCRYPT_2.0 XCRYPT_4.3 XCRYPT_4.4 +diff --git a/lib/libcrypt.minver b/lib/libcrypt.minver +index 701c836..39cf2c3 100644 +--- a/lib/libcrypt.minver ++++ b/lib/libcrypt.minver +@@ -59,6 +59,7 @@ GLIBC_2.3 kfreebsd.*gnu i[3-9]86 + ERROR kfreebsd.*gnu . + + # Linux with GNU libc ++GLIBC_2.34 linux.*gnu loongarch64 + GLIBC_2.33 linux.*gnu riscv32 + GLIBC_2.32 linux.*gnu arc + GLIBC_2.29 linux.*gnu csky +-- +2.33.0 + diff --git a/libxcrypt.spec b/libxcrypt.spec index 4ac85b9b46d4d92b200323119212969db4f7abce..88da8ef0f79791ce416b6739aecf53e47cf28b8f 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -5,7 +5,7 @@ %endif Name: libxcrypt Version: 4.4.26 -Release: 4 +Release: 5 Summary: Extended crypt library for DES, MD5, Blowfish and others License: LGPLv2+ and BSD and Public Domain URL: https://github.com/besser82/%{name} @@ -13,6 +13,7 @@ Source0: https://github.com/besser82/%{name}/archive/v%{version}.tar.gz Patch9000: add-sm3-crypt-support.patch Patch9001: libxcrypt-4.4.26-sw.patch +Patch9002: add-loongarch64-support-for-libxcrypt.patch BuildRequires: autoconf libtool fipscheck BuildRequires: perl >= 5.14.0 @@ -106,6 +107,9 @@ autoreconf -fiv %changelog +* Thu Feb 23 2023 Wenlong Zhang - 4.4.26-5 +- add loongarch64 support for libxcrypt + * Fri Oct 21 2022 wuzx - 4.4.26-4 - add sw64 patch