[packages/libxcrypt] - release 2, x32 buildfix
adamg
adamg at pld-linux.org
Mon Jan 28 07:41:41 CET 2019
commit 35b5b7a1577dcb59665a1562eb7ccb1754c74b27
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date: Mon Jan 28 07:41:34 2019 +0100
- release 2, x32 buildfix
0001-Add-x32-specific-inline-asm.patch | 42 ++++++++++++++++++++++++++++++++++
libxcrypt.spec | 4 +++-
2 files changed, 45 insertions(+), 1 deletion(-)
---
diff --git a/libxcrypt.spec b/libxcrypt.spec
index 54f5378..5d5636a 100644
--- a/libxcrypt.spec
+++ b/libxcrypt.spec
@@ -2,13 +2,14 @@ Summary: Crypt Library for DES, MD5, and Blowfish
Summary(pl.UTF-8): Biblioteka szyfrująca hasła obsługująca DES, MD5 i Blowfish
Name: libxcrypt
Version: 4.4.0
-Release: 1
+Release: 2
License: LGPL v2.1+
Group: Libraries
#Source0Download: https://github.com/besser82/libxcrypt/releases
Source0: https://github.com/besser82/libxcrypt/archive/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 13e9f41b9881956c529a028b636ff22b
Patch0: %{name}-xcrypt.patch
+Patch1: 0001-Add-x32-specific-inline-asm.patch
URL: https://github.com/besser82/libxcrypt
BuildRequires: autoconf >= 2.62
BuildRequires: automake >= 1:1.14
@@ -60,6 +61,7 @@ Ten pakiet zawiera statyczną wersję biblioteki libxcrypt.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
diff --git a/0001-Add-x32-specific-inline-asm.patch b/0001-Add-x32-specific-inline-asm.patch
new file mode 100644
index 0000000..9e31b03
--- /dev/null
+++ b/0001-Add-x32-specific-inline-asm.patch
@@ -0,0 +1,42 @@
+From 7d01f2acf6fde6341a68a91f9b343841cc424af7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Mon, 17 Dec 2018 11:33:35 -0800
+Subject: [PATCH] Add x32 specific inline asm
+
+Upstream-Status: Pending [https://github.com/besser82/libxcrypt/issues/74#issuecomment-447966455]
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ alg-yescrypt-opt.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/alg-yescrypt-opt.c b/alg-yescrypt-opt.c
+index 5dbd822..060caf4 100644
+--- a/alg-yescrypt-opt.c
++++ b/alg-yescrypt-opt.c
+@@ -528,6 +528,11 @@ static volatile uint64_t Smask2var = Smask2;
+ #undef MAYBE_MEMORY_BARRIER
+ #define MAYBE_MEMORY_BARRIER \
+ __asm__("" : : : "memory");
++#ifdef __ILP32__ /* x32 */
++#define REGISTER_PREFIX "e"
++#else
++#define REGISTER_PREFIX "r"
++#endif
+ #define PWXFORM_SIMD(X) { \
+ __m128i H; \
+ __asm__( \
+@@ -537,8 +542,8 @@ static volatile uint64_t Smask2var = Smask2;
+ "pmuludq %1, %0\n\t" \
+ "movl %%eax, %%ecx\n\t" \
+ "shrq $0x20, %%rax\n\t" \
+- "paddq (%3,%%rcx), %0\n\t" \
+- "pxor (%4,%%rax), %0\n\t" \
++ "paddq (%3,%%" REGISTER_PREFIX "cx), %0\n\t" \
++ "pxor (%4,%%" REGISTER_PREFIX "ax), %0\n\t" \
+ : "+x" (X), "=x" (H) \
+ : "d" (Smask2), "S" (S0), "D" (S1) \
+ : "cc", "ax", "cx"); \
+--
+2.20.1
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libxcrypt.git/commitdiff/35b5b7a1577dcb59665a1562eb7ccb1754c74b27
More information about the pld-cvs-commit
mailing list