From 3d67abb63773877f8285f1c641d4a94082c3a30e Mon Sep 17 00:00:00 2001 From: Hailiang Date: Fri, 28 Feb 2025 16:30:28 +0800 Subject: [PATCH] add sw_64 support (cherry picked from commit 39bb75ebd16a419a289a634442b91ef0d3f0736d) --- libxcrypt-4.4.26-sw.patch | 24 ++++++++++++++++++++++++ libxcrypt.spec | 6 +++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 libxcrypt-4.4.26-sw.patch diff --git a/libxcrypt-4.4.26-sw.patch b/libxcrypt-4.4.26-sw.patch new file mode 100644 index 0000000..ecf0a09 --- /dev/null +++ b/libxcrypt-4.4.26-sw.patch @@ -0,0 +1,24 @@ +diff -uNar libxcrypt-4.4.26.org/lib/crypt-bcrypt.c libxcrypt-4.4.26.sw/lib/crypt-bcrypt.c +--- libxcrypt-4.4.26.org/lib/crypt-bcrypt.c 2022-02-15 12:55:07.000000000 +0000 ++++ libxcrypt-4.4.26.sw/lib/crypt-bcrypt.c 2022-02-15 12:55:49.510000000 +0000 +@@ -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(__alpha__) || defined(__hppa__) || defined(__sw_64__) + #define BF_SCALE 1 + #else + #define BF_SCALE 0 +diff -uNar libxcrypt-4.4.26.org/lib/libcrypt.minver libxcrypt-4.4.26.sw/lib/libcrypt.minver +--- libxcrypt-4.4.26.org/lib/libcrypt.minver 2022-02-15 12:55:07.000000000 +0000 ++++ libxcrypt-4.4.26.sw/lib/libcrypt.minver 2022-02-15 14:16:36.550000000 +0000 +@@ -80,6 +80,7 @@ + GLIBC_2.2.5 linux.*gnu x86_64 defined __x86_64__ && ULONG_MAX != UINT_MAX /* 64 */ + GLIBC_2.2 linux.*gnu s390x + GLIBC_2.0 linux.*gnu alpha ++GLIBC_2.0 linux.*gnu sw_64 + GLIBC_2.0 linux.*gnu e2k + GLIBC_2.0 linux.*gnu hppa + GLIBC_2.0 linux.*gnu i[3-9]86 + diff --git a/libxcrypt.spec b/libxcrypt.spec index 4328dd6..5506b3b 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -1,7 +1,7 @@ %define libdir /lib64 Name: libxcrypt Version: 4.4.36 -Release: 2 +Release: 3 Summary: Extended crypt library for DES, MD5, Blowfish and others License: LGPLv2+ and BSD and Public Domain URL: https://github.com/besser82/%{name} @@ -9,6 +9,7 @@ Source0: https://github.com/besser82/%{name}/archive/v%{version}.tar.gz Patch9000: add-sm3-crypt-support.patch Patch9001: add-loongarch-support-for-libxcrypt.patch +Patch9002: libxcrypt-4.4.26-sw.patch BuildRequires: perl >= 5.14.0 BuildRequires: autoconf libtool fipscheck @@ -102,6 +103,9 @@ autoreconf -fiv %changelog +* Fri Feb 28 2025 mahailiang - 4.4.36-3 +- add sw_64 support + * Wed Mar 6 2024 Wenlong Zhang - 4.4.36-2 - Fix build error for loongarch64 -- Gitee