void-packages/srcpkgs/openssl/patches/xxx-ppcle.patch

54 lines
1.6 KiB
Diff

commit 56e07856a7a9f7ce3582b8cf3843f252691475a6
Author: q66 <daniel@octaforge.org>
Date: Fri Mar 5 18:36:01 2021 +0100
add ppcle support
diff --git Configurations/10-main.conf Configurations/10-main.conf
index 8dc3e85..18f10c9 100644
--- Configurations/10-main.conf
+++ Configurations/10-main.conf
@@ -665,6 +665,11 @@ my %targets = (
perlasm_scheme => "linux32",
lib_cppflags => add("-DB_ENDIAN"),
},
+ "linux-ppcle" => {
+ inherit_from => [ "linux-generic32", asm("ppc32_asm") ],
+ perlasm_scheme => "linux32le",
+ lib_cppflags => add("-DL_ENDIAN"),
+ },
"linux-ppc64" => {
inherit_from => [ "linux-generic64", asm("ppc64_asm") ],
cflags => add("-m64"),
diff --git config config
index 26225ca..6a1e830 100755
--- config
+++ config
@@ -543,6 +543,7 @@ case "$GUESSOS" in
fi
;;
ppc64le-*-linux2) OUT="linux-ppc64le" ;;
+ ppcle-*-linux2) OUT="linux-ppcle" ;;
ppc-*-linux2) OUT="linux-ppc" ;;
mips64*-*-linux2)
echo "WARNING! If you wish to build 64-bit library, then you have to"
diff --git crypto/poly1305/asm/poly1305-ppc.pl crypto/poly1305/asm/poly1305-ppc.pl
index e5d6933..3283f6b 100755
--- crypto/poly1305/asm/poly1305-ppc.pl
+++ crypto/poly1305/asm/poly1305-ppc.pl
@@ -314,10 +314,10 @@ $code.=<<___;
beq- Lno_key
___
$code.=<<___ if ($LITTLE_ENDIAN);
- lw $h0,0($inp) # load key material
- lw $h1,4($inp)
- lw $h2,8($inp)
- lw $h3,12($inp)
+ lwz $h0,0($inp) # load key material
+ lwz $h1,4($inp)
+ lwz $h2,8($inp)
+ lwz $h3,12($inp)
___
$code.=<<___ if (!$LITTLE_ENDIAN);
li $h1,4