FreeBSD Bugzilla – Attachment 209871 Details for
Bug 242521
security/nss: fix build on powerpc*
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v3
nss.patch (text/plain), 3.14 KB, created by
Piotr Kubaj
on 2019-12-11 16:37:54 UTC
(
hide
)
Description:
v3
Filename:
MIME Type:
Creator:
Piotr Kubaj
Created:
2019-12-11 16:37:54 UTC
Size:
3.14 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 519611) >+++ Makefile (working copy) >@@ -55,8 +55,8 @@ > BINS= ${DIST}/${OPSYS}${OSREL}_DBG.OBJ > .endif > >-.if ${OPSYS} == FreeBSD && ${ARCH} == i386 && ! ${MACHINE_CPU:Msse2} >-USES+= compiler:c++14-lang # gcm.h >+.if ${ARCH} == powerpc64 >+USES+= compiler:c++11-lang # -mcrypto -mvsx > .endif > > .if ${OPSYS} == FreeBSD && ${ARCH} == amd64 >Index: files/patch-bug1602386 >=================================================================== >--- files/patch-bug1602386 (nonexistent) >+++ files/patch-bug1602386 (working copy) >@@ -0,0 +1,54 @@ >+Fix build on FreeBSD/powerpc platforms. >+ >+https://bugzilla.mozilla.org/show_bug.cgi?id=1602386 >+ >+--- lib/freebl/blinit.c.orig 2019-12-11 11:17:26 UTC >++++ lib/freebl/blinit.c >+@@ -148,7 +148,7 @@ CheckARMSupport() >+ char *disable_pmull = PR_GetEnvSecure("NSS_DISABLE_PMULL"); >+ #if defined(__linux__) >+ if (getauxval) { >+- long hwcaps = getauxval(AT_HWCAP); >++ unsigned long hwcaps = getauxval(AT_HWCAP); >+ arm_aes_support_ = hwcaps & HWCAP_AES && disable_hw_aes == NULL; >+ arm_pmull_support_ = hwcaps & HWCAP_PMULL && disable_pmull == NULL; >+ arm_sha1_support_ = hwcaps & HWCAP_SHA1; >+@@ -289,7 +289,7 @@ CheckARMSupport() >+ // Also, AT_HWCAP2 is supported by glibc 2.18+ on Linux/arm, If >+ // AT_HWCAP2 isn't supported by glibc or Linux kernel, getauxval will >+ // returns 0. >+- long hwcaps = getauxval(AT_HWCAP2); >++ unsigned long hwcaps = getauxval(AT_HWCAP2); >+ if (!hwcaps) { >+ // Some ARMv8 devices may not implement AT_HWCAP2. So we also >+ // read /proc/cpuinfo if AT_HWCAP2 is 0. >+@@ -407,7 +407,17 @@ CheckPPCSupport() >+ { >+ char *disable_hw_crypto = PR_GetEnvSecure("NSS_DISABLE_PPC_GHASH"); >+ >+- long hwcaps = getauxval(AT_HWCAP2); >++#if defined(__linux__) >++ unsigned long hwcaps = getauxval(AT_HWCAP2); >++#elif defined(__FreeBSD__) >++ unsigned long hwcaps = 0; >++# if __FreeBSD__ >= 12 >++ elf_aux_info(AT_HWCAP2, &hwcaps, sizeof(hwcaps)); >++# else >++ size_t len = sizeof(hwcaps); >++ sysctlbyname("hw.cpu_features", &hwcaps, &len, NULL, 0); >++# endif >++#endif >+ >+ ppc_crypto_support_ = hwcaps & PPC_FEATURE2_VEC_CRYPTO && disable_hw_crypto == NULL; >+ } >+--- lib/freebl/Makefile.orig 2019-12-04 01:03:31.000000000 +0100 >++++ lib/freebl/Makefile 2019-12-11 16:48:47.959791000 +0100 >+@@ -788,5 +788,7 @@ >+ endif >+ >+ ifeq ($(CPU_ARCH),ppc) >+-$(OBJDIR)/$(PROG_PREFIX)gcm-ppc$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec >++$(OBJDIR)/$(PROG_PREFIX)gcm-ppc$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec -mvsx >++$(OBJDIR)/$(PROG_PREFIX)gcm$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec -mvsx >++$(OBJDIR)/$(PROG_PREFIX)rijndael$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec -mvsx >+ endif > >Property changes on: files/patch-bug1602386 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 242521
:
209799
|
209861
|
209871
|
209872