From 9f1a20bc9f23848d910a031c2a15a05cdb60b09a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Fri, 27 Feb 2015 21:18:33 +0100 Subject: [PATCH] - elevated x32 patch to hackery - rel 3 --- openssl.spec | 2 +- openssl_fix_for_x32.patch | 44 +++++++++++++-------------------------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/openssl.spec b/openssl.spec index a80e96e..a05f8d8 100644 --- a/openssl.spec +++ b/openssl.spec @@ -20,7 +20,7 @@ Summary(ru.UTF-8): Библиотеки и утилиты для соедине Summary(uk.UTF-8): Бібліотеки та утиліти для з'єднань через Secure Sockets Layer Name: openssl Version: 1.0.2 -Release: 2 +Release: 3 License: Apache-like Group: Libraries Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz diff --git a/openssl_fix_for_x32.patch b/openssl_fix_for_x32.patch index b05be1f..2a9271d 100644 --- a/openssl_fix_for_x32.patch +++ b/openssl_fix_for_x32.patch @@ -1,29 +1,15 @@ -diff -ruNp openssl-1.0.2.orig/crypto/bn/asm/x86_64-gcc.c openssl-1.0.2/crypto/bn/asm/x86_64-gcc.c ---- openssl-1.0.2.orig/crypto/bn/asm/x86_64-gcc.c 2015-01-22 15:58:32.000000000 +0100 -+++ openssl-1.0.2/crypto/bn/asm/x86_64-gcc.c 2015-01-27 16:19:21.432252035 +0100 -@@ -212,9 +212,9 @@ BN_ULONG bn_add_words(BN_ULONG *rp, cons - asm volatile (" subq %0,%0 \n" /* clear carry */ - " jmp 1f \n" - ".p2align 4 \n" -- "1: movq (%4,%2,8),%0 \n" -- " adcq (%5,%2,8),%0 \n" -- " movq %0,(%3,%2,8) \n" -+ "1: movq (%q4,%2,8),%0 \n" -+ " adcq (%q5,%2,8),%0 \n" -+ " movq %0,(%q3,%2,8) \n" - " lea 1(%2),%2 \n" - " loop 1b \n" - " sbbq %0,%0 \n":"=&r" (ret), "+c"(n), -@@ -238,9 +238,9 @@ BN_ULONG bn_sub_words(BN_ULONG *rp, cons - asm volatile (" subq %0,%0 \n" /* clear borrow */ - " jmp 1f \n" - ".p2align 4 \n" -- "1: movq (%4,%2,8),%0 \n" -- " sbbq (%5,%2,8),%0 \n" -- " movq %0,(%3,%2,8) \n" -+ "1: movq (%q4,%2,8),%0 \n" -+ " sbbq (%q5,%2,8),%0 \n" -+ " movq %0,(%q3,%2,8) \n" - " lea 1(%2),%2 \n" - " loop 1b \n" - " sbbq %0,%0 \n":"=&r" (ret), "+c"(n), +--- openssl-1.0.2/crypto/perlasm/x86_64-xlate.pl~ 2015-02-27 20:05:00.732776724 +0000 ++++ openssl-1.0.2/crypto/perlasm/x86_64-xlate.pl 2015-02-27 20:05:23.327082845 +0000 +@@ -199,8 +199,12 @@ + if ($gas) { + # Solaris /usr/ccs/bin/as can't handle multiplications + # in $self->{value} ++ if ($self->{value} =~ /0xA040608020C0E000/) { ++ $self->{value} = "11547335547999543296"; ++ } else { + $self->{value} =~ s/(?{value} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg; ++ } + sprintf "\$%s",$self->{value}; + } else { + $self->{value} =~ s/(0b[0-1]+)/oct($1)/eig; -- 2.43.0