[packages/polarssl] - fix building on x32 - rel 2
baggins
baggins at pld-linux.org
Thu May 7 19:46:31 CEST 2015
commit df209745ffc1014a3da095dddebe8bd4bba1a562
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu May 7 19:46:07 2015 +0200
- fix building on x32
- rel 2
polarssl.spec | 4 +++-
x32.patch | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/polarssl.spec b/polarssl.spec
index 75a7743..88798a9 100644
--- a/polarssl.spec
+++ b/polarssl.spec
@@ -2,11 +2,12 @@ Summary: Light-weight cryptographic and SSL/TLS library
Summary(pl.UTF-8): Lekka biblioteka kryptograficzna oraz SSL/TLS
Name: polarssl
Version: 1.3.9
-Release: 1
+Release: 2
License: GPL v2+
Group: Libraries
Source0: https://polarssl.org/code/releases/%{name}-%{version}-gpl.tgz
# Source0-md5: 48af7d1f0d5de512cbd6dacf5407884c
+Patch0: x32.patch
URL: https://polarssl.org/
BuildRequires: cmake >= 2.6
BuildRequires: doxygen
@@ -53,6 +54,7 @@ Statyczna biblioteka PolarSSL.
%prep
%setup -q
+%patch0 -p1
%build
install -d build
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..6cc51b1
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,38 @@
+--- polarssl-1.3.9/library/aesni.c.orig 2015-05-07 19:36:49.789268090 +0200
++++ polarssl-1.3.9/library/aesni.c 2015-05-07 19:38:05.120256538 +0200
+@@ -99,7 +99,11 @@
+ asm( "movdqu (%3), %%xmm0 \n\t" // load input
+ "movdqu (%1), %%xmm1 \n\t" // load round key 0
+ "pxor %%xmm1, %%xmm0 \n\t" // round 0
++#ifdef __ILP32__
++ "add $16, %1 \n\t" // point to next round key
++#else
+ "addq $16, %1 \n\t" // point to next round key
++#endif
+ "subl $1, %0 \n\t" // normal rounds = nr - 1
+ "test %2, %2 \n\t" // mode?
+ "jz 2f \n\t" // 0 = decrypt
+@@ -107,7 +111,11 @@
+ "1: \n\t" // encryption loop
+ "movdqu (%1), %%xmm1 \n\t" // load round key
+ AESENC xmm1_xmm0 "\n\t" // do round
++#ifdef __ILP32__
++ "add $16, %1 \n\t" // point to next round key
++#else
+ "addq $16, %1 \n\t" // point to next round key
++#endif
+ "subl $1, %0 \n\t" // loop
+ "jnz 1b \n\t"
+ "movdqu (%1), %%xmm1 \n\t" // load round key
+@@ -117,7 +125,11 @@
+ "2: \n\t" // decryption loop
+ "movdqu (%1), %%xmm1 \n\t"
+ AESDEC xmm1_xmm0 "\n\t" // do round
++#ifdef __ILP32__
++ "add $16, %1 \n\t"
++#else
+ "addq $16, %1 \n\t"
++#endif
+ "subl $1, %0 \n\t"
+ "jnz 2b \n\t"
+ "movdqu (%1), %%xmm1 \n\t" // load round key
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/polarssl.git/commitdiff/df209745ffc1014a3da095dddebe8bd4bba1a562
More information about the pld-cvs-commit
mailing list