aboutsummaryrefslogtreecommitdiffstats
path: root/security/nss
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2020-05-16 02:30:21 +0800
committerPiotr Kubaj <pkubaj@FreeBSD.org>2020-05-16 02:30:21 +0800
commit3a0f94aafeb620b86c4969d20344fe40a3eb2cde (patch)
tree2acd5c533ea90a6e7ef63afbfb474bc3ff012210 /security/nss
parent3f836611e2742df866640f97a22571b268553bdc (diff)
downloadfreebsd-ports-gnome-3a0f94aafeb620b86c4969d20344fe40a3eb2cde.tar.gz
freebsd-ports-gnome-3a0f94aafeb620b86c4969d20344fe40a3eb2cde.tar.zst
freebsd-ports-gnome-3a0f94aafeb620b86c4969d20344fe40a3eb2cde.zip
security/nss: fix build on powerpc and powerpc64 with gcc
PR: 246419 Approved by: jbeich (maintainer) MFH: 2020Q2 (fix build blanket)
Diffstat (limited to 'security/nss')
-rw-r--r--security/nss/Makefile13
-rw-r--r--security/nss/files/powerpc-lib_freebl_scripts_gen.sh11
-rw-r--r--security/nss/files/powerpc64elfv1-lib_freebl_scripts_gen.sh11
-rw-r--r--security/nss/files/powerpc64elfv2-lib_freebl_scripts_gen.sh11
4 files changed, 45 insertions, 1 deletions
diff --git a/security/nss/Makefile b/security/nss/Makefile
index 4b67e75178e9..e158e6e130ed 100644
--- a/security/nss/Makefile
+++ b/security/nss/Makefile
@@ -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 \
diff --git a/security/nss/files/powerpc-lib_freebl_scripts_gen.sh b/security/nss/files/powerpc-lib_freebl_scripts_gen.sh
new file mode 100644
index 000000000000..b94f83d13092
--- /dev/null
+++ b/security/nss/files/powerpc-lib_freebl_scripts_gen.sh
@@ -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"
diff --git a/security/nss/files/powerpc64elfv1-lib_freebl_scripts_gen.sh b/security/nss/files/powerpc64elfv1-lib_freebl_scripts_gen.sh
new file mode 100644
index 000000000000..156edb39c625
--- /dev/null
+++ b/security/nss/files/powerpc64elfv1-lib_freebl_scripts_gen.sh
@@ -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"
diff --git a/security/nss/files/powerpc64elfv2-lib_freebl_scripts_gen.sh b/security/nss/files/powerpc64elfv2-lib_freebl_scripts_gen.sh
new file mode 100644
index 000000000000..342ced38a985
--- /dev/null
+++ b/security/nss/files/powerpc64elfv2-lib_freebl_scripts_gen.sh
@@ -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"