head 1.7; access; symbols pkgsrc-2021Q1:1.1.0.8 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.6 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.4 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.2 pkgsrc-2020Q2-base:1.1; locks; strict; comment @# @; 1.7 date 2026.09.04.09.59.32; author tnn; state Exp; branches; next 1.6; commitid KvnsJcLZ8LXCWhUG; 1.6 date 2026.09.01.18.32.59; author tnn; state Exp; branches; next 1.5; commitid Z16aoyVzP8d5MWTG; 1.5 date 2021.05.16.17.42.31; author wiz; state dead; branches; next 1.4; commitid QJ9IUfishWAlLoTC; 1.4 date 2021.05.05.16.54.03; author wiz; state Exp; branches; next 1.3; commitid CHO99hnNQZu0RYRC; 1.3 date 2021.05.01.21.52.02; author wiz; state Exp; branches; next 1.2; commitid L3MUq343Efc6DuRC; 1.2 date 2021.04.23.16.07.43; author rin; state Exp; branches; next 1.1; commitid DSJFdUA5h8YZYqQC; 1.1 date 2020.04.26.21.43.43; author tnn; state Exp; branches; next ; commitid lVTejMW4nUkXsW5C; desc @@ 1.7 log @nss: add bug url @ text @$NetBSD: patch-nss_coreconf_NetBSD.mk,v 1.6 2026/09/01 18:32:59 tnn Exp $ Match what Linux.mk does for LITTLE_ENDIAN. https://bugzilla.mozilla.org/show_bug.cgi?id=2068010 --- nss/coreconf/NetBSD.mk.orig 2026-09-01 18:02:54.826000834 +0000 +++ nss/coreconf/NetBSD.mk @@@@ -1,3 +1,4 @@@@ + # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@@@ -33,6 +34,14 @@@@ DSO_LDOPTS = -shared -Wl,-soname,lib$(LIBRARY_NAME)$( DSO_CFLAGS = -fPIC -DPIC DSO_LDOPTS = -shared -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) + +# Test toolchain for endianness and set LITTLE_ENDIAN variable accordingly +ENDIANNESS := $(shell echo | $(CC) -dM -E - | grep __BYTE_ORDER__) +ifeq ($(findstring __ORDER_LITTLE_ENDIAN__,$(ENDIANNESS)),__ORDER_LITTLE_ENDIAN__) + LITTLE_ENDIAN := 1 +else + LITTLE_ENDIAN := 0 +endif # # The default implementation strategy for NetBSD is pthreads. @ 1.6 log @nss: fix regression on NetBSD aarch64 Between 3.127 and 3.128 upstream applied this in freebl: - DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 -DHAVE_PLATFORM_GHASH + DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 + ifeq ($(LITTLE_ENDIAN),1) + DEFINES += -DHAVE_PLATFORM_GHASH + endif But it is causing linker errors since nothing in NetBSD.mk sets the LITTLE_ENDIAN macro. Fix NetBSD.mk properly and remove previous arguably wrong band-aid for similar issue in patch-nss_lib_freebl_sha256-armv8.c @ text @d1 1 a1 1 $NetBSD$ d4 1 @ 1.5 log @nss: update to 3.65. Bugs fixed in NSS 3.65: * Bug 1709654 - Update for NetBSD configuration. * Bug 1709750 - Disable HPKE test when fuzzing. * Bug 1566124 - Optimize AES-GCM for ppc64le. * Bug 1699021 - Add AES-256-GCM to HPKE. * Bug 1698419 - ECH -10 updates. * Bug 1692930 - Update HPKE to final version. * Bug 1707130 - NSS should use modern algorithms in PKCS#12 files by default. * Bug 1703936 - New coverity/cpp scanner errors. * Bug 1697303 - NSS needs to update it's csp clearing to FIPS 180-3 standards. * Bug 1702663 - Need to support RSA PSS with Hashing PKCS #11 Mechanisms. * Bug 1705119 - Deadlock when using GCM and non-thread safe tokens. @ text @d1 1 a1 1 $NetBSD: patch-nss_coreconf_NetBSD.mk,v 1.4 2021/05/05 16:54:03 wiz Exp $ d3 1 a3 1 Match more closely to OpenBSD.mk, and in particular, hide symbols (MAPFILE). d5 1 a5 6 - fix wrong value of CPU_ARCH on NetBSD/evbarm-earmv7f - s/aarch64eb/aarch64/ https://bugzilla.mozilla.org/show_bug.cgi?id=1709654 --- nss/coreconf/NetBSD.mk.orig 2021-04-15 16:17:44.000000000 +0000 d7 6 a12 38 @@@@ -5,9 +5,10 @@@@ include $(CORE_DEPTH)/coreconf/UNIX.mk -DEFAULT_COMPILER = gcc -CC = gcc -CCC = g++ +CC ?= gcc +CXX ?= g++ +DEFAULT_COMPILER = ${CC} +CCC = ${CXX} RANLIB = ranlib CPU_ARCH := $(shell uname -p) @@@@ -15,16 +16,14 @@@@ ifeq ($(CPU_ARCH),i386) OS_REL_CFLAGS = -Di386 CPU_ARCH = x86 endif - -ifndef OBJECT_FMT -OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi) +ifeq (,$(filter-out earm%,$(CPU_ARCH))) +CPU_ARCH = arm +endif +ifeq ($(CPU_ARCH),aarch64eb) +CPU_ARCH = aarch64 endif -ifeq ($(OBJECT_FMT),ELF) DLL_SUFFIX = so -else -DLL_SUFFIX = so.1.0 -endif OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -Wno-switch -pipe -DNETBSD -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK @@@@ -33,9 +32,16 @@@@ OS_LIBS = -lcompat ARCH = netbsd d15 1 a15 4 -DSO_LDOPTS = -shared -ifeq ($(OBJECT_FMT),ELF) -DSO_LDOPTS += -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +DSO_LDOPTS = -shared -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) d17 7 a23 25 +# +# The default implementation strategy for NetBSD is pthreads. +# +ifndef CLASSIC_NSPR +USE_PTHREADS = 1 +DEFINES += -D_THREAD_SAFE -D_REENTRANT +OS_LIBS += -pthread +DSO_LDOPTS += -pthread endif ifdef LIBRUNPATH @@@@ -44,12 +50,8 @@@@ endif MKSHLIB = $(CC) $(DSO_LDOPTS) ifdef MAPFILE -# Add LD options to restrict exported symbols to those in the map file + MKSHLIB += -Wl,--version-script,$(MAPFILE) endif -# Change PROCESS to put the mapfile in the correct format for this platform -PROCESS_MAP_FILE = cp $< $@@ - - -G++INCLUDES = -I/usr/include/g++ +PROCESS_MAP_FILE = grep -v ';-' $< | \ + sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@@ d25 2 a26 1 -INCLUDES += -I/usr/X11R6/include @ 1.4 log @nss: add upstream bug report URL @ text @d1 1 a1 1 $NetBSD: patch-nss_coreconf_NetBSD.mk,v 1.3 2021/05/01 21:52:02 wiz Exp $ @ 1.3 log @nss: hide symbols on NetBSD like on other platforms Remove local workarounds again Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-nss_coreconf_NetBSD.mk,v 1.2 2021/04/23 16:07:43 rin Exp $ d8 2 @ 1.2 log @nss: Fix support for NetBSD/aarch64eb. Bump revision. @ text @d1 3 a3 1 $NetBSD$ d8 17 a24 3 --- nss/coreconf/NetBSD.mk.orig 2021-04-16 01:17:44.000000000 +0900 +++ nss/coreconf/NetBSD.mk 2021-04-24 00:37:05.764452953 +0900 @@@@ -15,6 +15,12 @@@@ d28 3 d36 44 a79 1 +endif d81 1 a81 2 ifndef OBJECT_FMT OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi) @ 1.1 log @nss: fix wrong value of CPU_ARCH on NetBSD/evbarm-earmv7hf Fixes PR pkg/53353 and maybe also PR pkg/55158 @ text @d3 2 a4 1 fix wrong value of CPU_ARCH on NetBSD/evbarm-earmv7f d6 3 a8 3 --- nss/coreconf/NetBSD.mk.orig 2020-03-06 18:44:20.000000000 +0000 +++ nss/coreconf/NetBSD.mk @@@@ -15,6 +15,9 @@@@ ifeq ($(CPU_ARCH),i386) d15 3 @