mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-29 00:42:58 +02:00
nettle: always use auxval on ppc, and fix on ppc64 big endian
This commit is contained in:
parent
c5d4caeafb
commit
b082953404
2 changed files with 43 additions and 0 deletions
21
srcpkgs/nettle/patches/musl-ppc-use-auxval.patch
Normal file
21
srcpkgs/nettle/patches/musl-ppc-use-auxval.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
This ensures that efficient capability checks are used on musl.
|
||||||
|
|
||||||
|
--- fat-ppc.c
|
||||||
|
+++ fat-ppc.c
|
||||||
|
@@ -42,12 +42,10 @@
|
||||||
|
|
||||||
|
#if defined(_AIX)
|
||||||
|
# include <sys/systemcfg.h>
|
||||||
|
-#elif defined(__linux__) && defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||||
|
-# if __GLIBC_PREREQ(2, 16)
|
||||||
|
-# define USE_GETAUXVAL 1
|
||||||
|
-# include <asm/cputable.h>
|
||||||
|
-# include <sys/auxv.h>
|
||||||
|
-# endif
|
||||||
|
+#elif defined(__linux__)
|
||||||
|
+# define USE_GETAUXVAL 1
|
||||||
|
+# include <asm/cputable.h>
|
||||||
|
+# include <sys/auxv.h>
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
# include <machine/cpu.h>
|
||||||
|
# ifdef PPC_FEATURE2_HAS_VEC_CRYPTO
|
22
srcpkgs/nettle/patches/ppc64-elfv2.patch
Normal file
22
srcpkgs/nettle/patches/ppc64-elfv2.patch
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
Ensure that ELFv2 ABI is used on all ppc64, including big endian.
|
||||||
|
|
||||||
|
--- powerpc64/machine.m4
|
||||||
|
+++ powerpc64/machine.m4
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
define(`PROLOGUE',
|
||||||
|
`.globl C_NAME($1)
|
||||||
|
DECLARE_FUNC(C_NAME($1))
|
||||||
|
-ifelse(WORDS_BIGENDIAN,no,
|
||||||
|
+ifelse(`no',`no',
|
||||||
|
`ifdef(`FUNC_ALIGN',`.align FUNC_ALIGN')
|
||||||
|
C_NAME($1):
|
||||||
|
addis 2,12,(.TOC.-C_NAME($1))@ha
|
||||||
|
@@ -17,7 +17,7 @@ ifdef(`FUNC_ALIGN',`.align FUNC_ALIGN')
|
||||||
|
undefine(`FUNC_ALIGN')')
|
||||||
|
|
||||||
|
define(`EPILOGUE',
|
||||||
|
-`ifelse(WORDS_BIGENDIAN,no,
|
||||||
|
+`ifelse(`no',`no',
|
||||||
|
`.size C_NAME($1), . - C_NAME($1)',
|
||||||
|
`.size .C_NAME($1), . - .C_NAME($1)
|
||||||
|
.size C_NAME($1), . - .C_NAME($1)')')
|
Loading…
Add table
Reference in a new issue