mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2025-03-15 10:28:20 +00:00
openssl:
- adding patch to let us crosscompile x86_64
This commit is contained in:
packages/security/openssl/patches
56
packages/security/openssl/patches/10_fix-x86_64-asm.diff
Normal file
56
packages/security/openssl/patches/10_fix-x86_64-asm.diff
Normal file
@ -0,0 +1,56 @@
|
||||
diff -Naur openssl-0.9.8k/crypto/md5/asm/md5-x86_64.pl openssl-0.9.8k2/crypto/md5/asm/md5-x86_64.pl
|
||||
--- openssl-0.9.8k/crypto/md5/asm/md5-x86_64.pl 2007-11-11 14:34:06.000000000 +0100
|
||||
+++ openssl-0.9.8k2/crypto/md5/asm/md5-x86_64.pl 2009-11-30 10:04:51.000000000 +0100
|
||||
@@ -19,6 +19,7 @@
|
||||
sub round1_step
|
||||
{
|
||||
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
||||
+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
||||
$code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
|
||||
$code .= " mov %edx, %r11d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1);
|
||||
$code .= <<EOF;
|
||||
@@ -42,6 +43,7 @@
|
||||
sub round2_step
|
||||
{
|
||||
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
||||
+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
||||
$code .= " mov 1*4(%rsi), %r10d /* (NEXT STEP) X[1] */\n" if ($pos == -1);
|
||||
$code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
|
||||
$code .= <<EOF;
|
||||
@@ -65,6 +67,7 @@
|
||||
sub round3_step
|
||||
{
|
||||
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
||||
+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
||||
$code .= " mov 5*4(%rsi), %r10d /* (NEXT STEP) X[5] */\n" if ($pos == -1);
|
||||
$code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
|
||||
$code .= <<EOF;
|
||||
@@ -87,6 +90,7 @@
|
||||
sub round4_step
|
||||
{
|
||||
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
||||
+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
||||
$code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
|
||||
$code .= " mov \$0xffffffff, %r11d\n" if ($pos == -1);
|
||||
$code .= " xor %edx, %r11d /* (NEXT STEP) not z' = not %edx*/\n"
|
||||
diff -Naur openssl-0.9.8k/crypto/sha/asm/sha1-x86_64.pl openssl-0.9.8k2/crypto/sha/asm/sha1-x86_64.pl
|
||||
--- openssl-0.9.8k/crypto/sha/asm/sha1-x86_64.pl 2007-11-11 14:56:47.000000000 +0100
|
||||
+++ openssl-0.9.8k2/crypto/sha/asm/sha1-x86_64.pl 2009-11-30 10:06:02.000000000 +0100
|
||||
@@ -143,7 +143,7 @@
|
||||
sub BODY_20_39 {
|
||||
my ($i,$a,$b,$c,$d,$e,$f)=@_;
|
||||
my $j=$i+1;
|
||||
-my $K=($i<40)?0x6ed9eba1:0xca62c1d6;
|
||||
+my $K=($i<40)?0x6ed9eba1:-0x359d3e2a;
|
||||
$code.=<<___ if ($i<79);
|
||||
lea $K($xi,$e),$f
|
||||
mov `4*($j%16)`(%rsp),$xi
|
||||
@@ -180,7 +180,7 @@
|
||||
my ($i,$a,$b,$c,$d,$e,$f)=@_;
|
||||
my $j=$i+1;
|
||||
$code.=<<___;
|
||||
- lea 0x8f1bbcdc($xi,$e),$f
|
||||
+ lea -0x70e44324($xi,$e),$f
|
||||
mov `4*($j%16)`(%rsp),$xi
|
||||
mov $b,$t0
|
||||
mov $b,$t1
|
@ -1,18 +0,0 @@
|
||||
sys/timeb.h / ftime are legacy, so don't enable them for uClibc
|
||||
---
|
||||
apps/speed.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: openssl-0.9.8g/apps/speed.c
|
||||
===================================================================
|
||||
--- openssl-0.9.8g.orig/apps/speed.c
|
||||
+++ openssl-0.9.8g/apps/speed.c
|
||||
@@ -113,7 +113,7 @@
|
||||
#elif !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
|
||||
# define TIMES
|
||||
#endif
|
||||
-#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) && !defined(OPENSSL_SYS_VXWORKS) /* FIXME */
|
||||
+#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) && !defined(OPENSSL_SYS_VXWORKS) && !defined(__UCLIBC__) /* FIXME */
|
||||
# define TIMEB
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user