git: 8ba3b6686290 - main - security/nss: fix build on powerpc / powerpc64

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 20 May 2026 08:36:22 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8ba3b6686290a0d1906fd2ed321d1dfa9e977552

commit 8ba3b6686290a0d1906fd2ed321d1dfa9e977552
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-05-14 12:37:08 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-05-20 08:36:11 +0000

    security/nss: fix build on powerpc / powerpc64
    
    Ghash code is actually powerpc64le-specific.
---
 security/nss/files/patch-lib-freebl-Makefile | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/security/nss/files/patch-lib-freebl-Makefile b/security/nss/files/patch-lib-freebl-Makefile
index 3d4f4d308d80..5385afcb34e6 100644
--- a/security/nss/files/patch-lib-freebl-Makefile
+++ b/security/nss/files/patch-lib-freebl-Makefile
@@ -11,11 +11,9 @@ Date:   Fri Feb 20 21:15:44 2026 +0100
     
         security/nss: fix build on powerpc64le
 
-diff --git lib/freebl/Makefile lib/freebl/Makefile
-index 9286e436f..3509a0656 100644
---- lib/freebl/Makefile
+--- lib/freebl/Makefile.orig	2026-04-23 19:28:50 UTC
 +++ lib/freebl/Makefile
-@@ -263,7 +263,7 @@ else ifeq ($(CPU_ARCH),x86)
+@@ -263,7 +263,7 @@ endif # Darwin
  endif
  endif # Darwin
  
@@ -24,16 +22,25 @@ index 9286e436f..3509a0656 100644
  ifeq ($(CPU_ARCH),x86_64)
      # Lower case s on mpi_amd64_common due to make implicit rules.
      ASFILES  = arcfour-amd64-gas.s mpi_amd64_common.s
-@@ -297,11 +297,11 @@ ifdef USE_64
+@@ -290,18 +290,16 @@ ifeq ($(CPU_ARCH),ppc)
+     MPI_SRCS += mpi_arm.c
+ endif
+ ifeq ($(CPU_ARCH),ppc)
+-    DEFINES += -DHAVE_PLATFORM_GHASH
+-    EXTRA_SRCS += ghash-ppc.c
+ ifdef USE_64
+     DEFINES += -DNSS_NO_INIT_SUPPORT
      PPC_ABI := $(shell $(CC) -dM -E - < /dev/null | awk '$$2 == "_CALL_ELF" {print $$3}')
      ifeq ($(PPC_ABI),2)
          ASFILES += sha512-p8.s
 -    ifeq ($(OS_TEST),ppc64le)
+-        EXTRA_SRCS += chacha20poly1305-ppc.c ppc-gcm-wrap.c
 +    ifeq (,$(filter-out powerpc64le ppc64le, $(OS_TEST)))
-         EXTRA_SRCS += chacha20poly1305-ppc.c ppc-gcm-wrap.c
++        EXTRA_SRCS += chacha20poly1305-ppc.c ghash-ppc.c ppc-gcm-wrap.c
          ASFILES += chacha20-ppc64le.s ppc-gcm.s
-         DEFINES += -DHAVE_PLATFORM_GCM
+-        DEFINES += -DHAVE_PLATFORM_GCM
 -    endif # ppc64le
++        DEFINES += -DHAVE_PLATFORM_GCM -DHAVE_PLATFORM_GHASH
 +    endif # powerpc64le, ppc64le
      endif
  endif # USE_64