1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00

security/nss: fix build on powerpc and powerpc64 with gcc

PR:             246419
Approved by:    jbeich (maintainer)
MFH:            2020Q2 (fix build blanket)
This commit is contained in:
Piotr Kubaj 2020-05-15 18:30:21 +00:00
parent 3f836611e2
commit 3a0f94aafe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=535312
4 changed files with 45 additions and 1 deletions

View File

@ -47,6 +47,11 @@ INSTALL_BINS= certutil cmsutil crlutil derdump makepqg \
ssltap strsclnt symkeyutil vfychain vfyserv
OPTIONS_DEFINE= DEBUG
OPTIONS_DEFINE_powerpc64= VSX
OPTIONS_DEFINE_powerpc= VSX
VSX_CFLAGS= -DUSE_PPC_CRYPTO
VSX_DESC= Use VSX optimized routines (POWER8 or newer)
.include <bsd.port.options.mk>
@ -57,7 +62,8 @@ BINS= ${DIST}/${OPSYS}${OSREL}_OPT.OBJ
BINS= ${DIST}/${OPSYS}${OSREL}_DBG.OBJ
.endif
.if ${ARCH} == powerpc64
.if ${ARCH} == powerpc64 || ${ARCH} == powerpc
EXTRA_PATCHES= ${FILESDIR}/${ARCH}${PPC_ABI:tl}-lib_freebl_scripts_gen.sh
USES+= compiler:c++11-lang # -mcrypto -mvsx
.else
MAKE_ENV+= NSS_DISABLE_ALTIVEC=1
@ -89,6 +95,11 @@ post-patch:
${FIND} . -name "*.c" -o -name "*.h" | \
${XARGS} ${REINPLACE_CMD} -e 's|"nspr.h"|<nspr.h>|'
#.if ${ARCH} == powerpc64 || ${ARCH} == powerpc
#pre-build:
# @cd ${WRKSRC}/lib/freebl/scripts && ./gen.sh
#.endif
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/nss ${STAGEDIR}${PREFIX}/lib
${FIND} ${DIST}/public/nss -type l \

View File

@ -0,0 +1,11 @@
--- lib/freebl/scripts/gen.sh.orig 2020-05-12 17:17:31 UTC
+++ lib/freebl/scripts/gen.sh
@@ -3,7 +3,7 @@
# Run the scripts in this folder, generating the assembly,
#
-perl sha512p8-ppc.pl linux64le sha512-p8.s
+perl sha512p8-ppc.pl linux32 sha512-p8.s
# Add the license mention
cat > hdr << "EOF"

View File

@ -0,0 +1,11 @@
--- lib/freebl/scripts/gen.sh.orig 2020-05-12 17:17:31 UTC
+++ lib/freebl/scripts/gen.sh
@@ -3,7 +3,7 @@
# Run the scripts in this folder, generating the assembly,
#
-perl sha512p8-ppc.pl linux64le sha512-p8.s
+perl sha512p8-ppc.pl linux64 sha512-p8.s
# Add the license mention
cat > hdr << "EOF"

View File

@ -0,0 +1,11 @@
--- lib/freebl/scripts/gen.sh.orig 2020-05-12 17:17:31 UTC
+++ lib/freebl/scripts/gen.sh
@@ -3,7 +3,7 @@
# Run the scripts in this folder, generating the assembly,
#
-perl sha512p8-ppc.pl linux64le sha512-p8.s
+perl sha512p8-ppc.pl linux64v2 sha512-p8.s
# Add the license mention
cat > hdr << "EOF"