diff --git a/libxcrypt-4.4.26-sw.patch b/1000-add-sw_64-support-not-upstream-modified-files.patch old mode 100755 new mode 100644 similarity index 100% rename from libxcrypt-4.4.26-sw.patch rename to 1000-add-sw_64-support-not-upstream-modified-files.patch diff --git a/1001-add-loongarch64-support-not-upstream-modified-files.patch b/1001-add-loongarch64-support-not-upstream-modified-files.patch new file mode 100644 index 0000000000000000000000000000000000000000..29b92693db17246e0a68c868dc49b27092d563f6 --- /dev/null +++ b/1001-add-loongarch64-support-not-upstream-modified-files.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 501dd2743bd964ad52fbe1bfef4b2a90efe22b3a..e8f89988e62e0e1f9f455661c335bd2f83f16662 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -5,16 +5,18 @@ %endif Name: libxcrypt Version: 4.4.26 -Release: 5 +Release: 6 Summary: Extended crypt library for DES, MD5, Blowfish and others License: LGPLv2+ and BSD and Public Domain URL: https://github.com/besser82/%{name} Source0: https://github.com/besser82/%{name}/archive/v%{version}.tar.gz +Patch1000: 1000-add-sw_64-support-not-upstream-modified-files.patch +Patch1001: 1001-add-loongarch64-support-not-upstream-modified-files.patch + Patch9000: add-sm3-crypt-support.patch -Patch9001: libxcrypt-4.4.26-sw.patch -Patch9002: upstream-Fix-warning-about-truncating-conversion.patch -Patch9003: upstream-Fix-warning-about-signed-unsigned-conversion.patch +Patch9001: upstream-Fix-warning-about-truncating-conversion.patch +Patch9002: upstream-Fix-warning-about-signed-unsigned-conversion.patch BuildRequires: autoconf libtool fipscheck BuildRequires: perl >= 5.14.0 @@ -108,6 +110,9 @@ autoreconf -fiv %changelog +* Mon Aug 28 2023 herengui - 4.4.26-6 +- add loongarch64 support + * Fri Jun 9 2023 Chenxi Mao - 4.4.26-5 - Cherry pick upstream patches to fix build errors if avx2 enabled.