security/openssl-devel: fix build on powerpc*
Bring back the patches removed earlier.
This commit is contained in:
parent
3090fb28ee
commit
1e7b421ad5
4 changed files with 94 additions and 0 deletions
|
@ -0,0 +1,35 @@
|
|||
--- Configurations/10-main.conf.orig 2022-04-12 16:29:42 UTC
|
||||
+++ Configurations/10-main.conf
|
||||
@@ -1069,6 +1069,32 @@ my %targets = (
|
||||
perlasm_scheme => "linux64",
|
||||
},
|
||||
|
||||
+ "BSD-ppc" => {
|
||||
+ inherit_from => [ "BSD-generic32" ],
|
||||
+ asm_arch => 'ppc32',
|
||||
+ perlasm_scheme => "linux32",
|
||||
+ lib_cppflags => add("-DB_ENDIAN"),
|
||||
+ },
|
||||
+
|
||||
+ "BSD-ppc64" => {
|
||||
+ inherit_from => [ "BSD-generic64" ],
|
||||
+ cflags => add("-m64"),
|
||||
+ cxxflags => add("-m64"),
|
||||
+ lib_cppflags => add("-DB_ENDIAN"),
|
||||
+ asm_arch => 'ppc64',
|
||||
+ perlasm_scheme => "linux64",
|
||||
+ },
|
||||
+
|
||||
+ "BSD-ppc64le" => {
|
||||
+ inherit_from => [ "BSD-generic64" ],
|
||||
+ cflags => add("-m64"),
|
||||
+ cxxflags => add("-m64"),
|
||||
+ lib_cppflags => add("-DL_ENDIAN"),
|
||||
+ asm_arch => 'ppc64',
|
||||
+ perlasm_scheme => "linux64le",
|
||||
+ },
|
||||
+
|
||||
+
|
||||
"bsdi-elf-gcc" => {
|
||||
inherit_from => [ "BASE_unix" ],
|
||||
CC => "gcc",
|
11
security/openssl-devel/files/patch-Configure
Normal file
11
security/openssl-devel/files/patch-Configure
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- Configure.orig 2022-04-12 16:30:34 UTC
|
||||
+++ Configure
|
||||
@@ -1549,7 +1549,7 @@ my %predefined_CXX = $config{CXX}
|
||||
|
||||
unless ($disabled{asm}) {
|
||||
# big endian systems can use ELFv2 ABI
|
||||
- if ($target eq "linux-ppc64") {
|
||||
+ if ($target eq "linux-ppc64" || $target eq "BSD-ppc64") {
|
||||
$target{perlasm_scheme} = "linux64v2" if ($predefined_C{_CALL_ELF} == 2);
|
||||
}
|
||||
}
|
34
security/openssl-devel/files/patch-crypto_ppccap.c
Normal file
34
security/openssl-devel/files/patch-crypto_ppccap.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
--- crypto/ppccap.c.orig 2022-04-12 16:31:27 UTC
|
||||
+++ crypto/ppccap.c
|
||||
@@ -117,14 +117,18 @@ static unsigned long getauxval(unsigned long key)
|
||||
#endif
|
||||
|
||||
/* I wish <sys/auxv.h> was universally available */
|
||||
-#define HWCAP 16 /* AT_HWCAP */
|
||||
+#ifndef AT_HWCAP
|
||||
+# define AT_HWCAP 16 /* AT_HWCAP */
|
||||
+#endif
|
||||
#define HWCAP_PPC64 (1U << 30)
|
||||
#define HWCAP_ALTIVEC (1U << 28)
|
||||
#define HWCAP_FPU (1U << 27)
|
||||
#define HWCAP_POWER6_EXT (1U << 9)
|
||||
#define HWCAP_VSX (1U << 7)
|
||||
|
||||
-#define HWCAP2 26 /* AT_HWCAP2 */
|
||||
+#ifndef AT_HWCAP2
|
||||
+# define AT_HWCAP2 26 /* AT_HWCAP2 */
|
||||
+#endif
|
||||
#define HWCAP_VEC_CRYPTO (1U << 25)
|
||||
#define HWCAP_ARCH_3_00 (1U << 23)
|
||||
|
||||
@@ -215,8 +219,8 @@ void OPENSSL_cpuid_setup(void)
|
||||
|
||||
#ifdef OSSL_IMPLEMENT_GETAUXVAL
|
||||
{
|
||||
- unsigned long hwcap = getauxval(HWCAP);
|
||||
- unsigned long hwcap2 = getauxval(HWCAP2);
|
||||
+ unsigned long hwcap = getauxval(AT_HWCAP);
|
||||
+ unsigned long hwcap2 = getauxval(AT_HWCAP2);
|
||||
|
||||
if (hwcap & HWCAP_FPU) {
|
||||
OPENSSL_ppccap_P |= PPC_FPU;
|
|
@ -0,0 +1,14 @@
|
|||
--- util/perl/OpenSSL/config.pm.orig 2022-04-12 16:34:06 UTC
|
||||
+++ util/perl/OpenSSL/config.pm
|
||||
@@ -747,8 +747,9 @@ EOF
|
||||
disable => [ 'sse2' ] } ],
|
||||
[ 'alpha.*-.*-.*bsd.*', { target => "BSD-generic64",
|
||||
defines => [ 'L_ENDIAN' ] } ],
|
||||
- [ 'powerpc64-.*-.*bsd.*', { target => "BSD-generic64",
|
||||
- defines => [ 'B_ENDIAN' ] } ],
|
||||
+ [ 'powerpc-.*-.*bsd.*', { target => "BSD-ppc" } ],
|
||||
+ [ 'powerpc64-.*-.*bsd.*', { target => "BSD-ppc64" } ],
|
||||
+ [ 'powerpc64le-.*-.*bsd.*', { target => "BSD-ppc64le" } ],
|
||||
[ 'riscv64-.*-.*bsd.*', { target => "BSD-riscv64" } ],
|
||||
[ 'sparc64-.*-.*bsd.*', { target => "BSD-sparc64" } ],
|
||||
[ 'ia64-.*-.*bsd.*', { target => "BSD-ia64" } ],
|
Loading…
Reference in a new issue