Skip to contentSkip to conversation

package/libnss: bump version to 3.51

PATCH New Giulio Benetti 2 participants 2 messages Mar 12, 2020 – Mar 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libnss: bump version to 3.51

Release notes:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.51_release_notes

Remove upstreamed patch but add another patch to allow disable Neon acceleration while building gcm on Arm32. This patch adds NSS_DISABLE_GCM_ARM32_NEON variable that is set to 1 if BR2_ARM_CPU_HAS_NEON is not set to y.

---
New patch is pending upstream:
https://bugzilla.mozilla.org/show_bug.cgi?id=1620799

---
 ...heck-if-PPC-__has_include-sys-auxv.h.patch |  51 -------
 ...Introduce-NSS_DISABLE_GCM_ARM32_NEON.patch | 127 ++++++++++++++++++
 package/libnss/libnss.hash                    |   4 +-
 package/libnss/libnss.mk                      |   7 +-
 4 files changed, 135 insertions(+), 54 deletions(-)
 delete mode 100644 package/libnss/0001-Bug-1614183-Check-if-PPC-__has_include-sys-auxv.h.patch
 create mode 100644 package/libnss/0001-Bug-1620799-Introduce-NSS_DISABLE_GCM_ARM32_NEON.patch
package/libnss/0001-Bug-1614183-Check-if-PPC-__has_include-sys-auxv.h.patch deleted +0 -51
deleted file mode 100644
index 1325387760..0000000000
@@ -1,51 +0,0 @@
-From d9c7cbb3660d8a2da9ce42e4d1b58642a256a91a Mon Sep 17 00:00:00 2001
-From: Giulio Benetti <[email protected]>
-Date: Sun, 9 Feb 2020 10:15:16 +0100
-Subject: [PATCH] Bug 1614183 - Check if PPC __has_include(<sys/auxv.h>)
-
-Some build environment doesn't provide <sys/auxv.h> and this causes
-build failure, so let's check if that header exists by using
-__has_include() helper.
-
-Signed-off-by: Giulio Benetti <[email protected]>
----
- nss/lib/freebl/blinit.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/nss/lib/freebl/blinit.c b/nss/lib/freebl/blinit.c
-index 7e8adfc64..d4921aaee 100644
---- a/nss/lib/freebl/blinit.c
-+++ b/nss/lib/freebl/blinit.c
-@@ -431,8 +431,14 @@ ppc_crypto_support()
- 
- #if defined(__powerpc__)
- 
-+#ifndef __has_include
-+#define __has_include(x) 0
-+#endif
-+
- #if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 12)
-+#if __has_include(<sys/auxv.h>)
- #include <sys/auxv.h>
-+#endif
- #elif (defined(__FreeBSD__) && __FreeBSD__ < 12)
- #include <sys/sysctl.h>
- #endif
-@@ -449,10 +455,14 @@ CheckPPCSupport()
- 
-     unsigned long hwcaps = 0;
- #if defined(__linux__)
-+#if __has_include(<sys/auxv.h>)
-     hwcaps = getauxval(AT_HWCAP2);
-+#endif
- #elif defined(__FreeBSD__)
- #if __FreeBSD__ >= 12
-+#if __has_include(<sys/auxv.h>)
-     elf_aux_info(AT_HWCAP2, &hwcaps, sizeof(hwcaps));
-+#endif
- #else
-     size_t len = sizeof(hwcaps);
-     sysctlbyname("hw.cpu_features2", &hwcaps, &len, NULL, 0);
--- 
-2.20.1
-
package/libnss/0001-Bug-1620799-Introduce-NSS_DISABLE_GCM_ARM32_NEON.patch new file +127 -0

127 lines not on this page · raw message

package/libnss/libnss.hash +2 -2
index f4a6d74ee7..7f496311f4 100644
@@ -1,4 +1,4 @@
-# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_50_RTM/src/SHA256SUMS
-sha256	185df319775243f5f5daa9d49b7f9cc5f2b389435be3247c3376579bee063ba7  nss-3.50.tar.gz
+# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_51_RTM/src/SHA256SUMS
+sha256	75348b3b3229362486c57a880db917da1f96ef4eb639dc9cc2ff17d72268459c  nss-3.51.tar.gz
 # Locally calculated
 sha256	a20c1a32d1f8102432360b42e932869f7c11c7cdbacf9cac554c422132af47f4  nss/COPYING
package/libnss/libnss.mk +6 -1
index e439150ecd..8faf243545 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBNSS_VERSION = 3.50
+LIBNSS_VERSION = 3.51
 LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz
 LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(subst .,_,$(LIBNSS_VERSION))_RTM/src
 LIBNSS_DISTDIR = dist
@@ -55,6 +55,11 @@ ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
 LIBNSS_BUILD_VARS += NSS_DISABLE_ALTIVEC=1
 endif
 
+ifeq ($(BR2_ARM_CPU_HAS_NEON),)
+# Disable gcm-arm32-neon if neon is not supported
+LIBNSS_BUILD_VARS += NSS_DISABLE_GCM_ARM32_NEON=1
+endif
+
 ifeq ($(BR2_ARCH_IS_64),y)
 # MIPS64 n32 is treated as a 32-bit architecture by libnss.
 # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1010730
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/libnss: bump version to 3.51

Quoted 12 lines · On Thu, 12 Mar 2020 19:06:29 +0100 Giulio Benetti…

Release notes:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.51_release_notes

Remove upstreamed patch but add another patch to allow disable Neon acceleration while building gcm on Arm32. This patch adds NSS_DISABLE_GCM_ARM32_NEON variable that is set to 1 if BR2_ARM_CPU_HAS_NEON is not set to y.

---
New patch is pending upstream:
https://bugzilla.mozilla.org/show_bug.cgi?id=1620799

Quoted 8 lines
---
 ...heck-if-PPC-__has_include-sys-auxv.h.patch |  51 -------
 ...Introduce-NSS_DISABLE_GCM_ARM32_NEON.patch | 127 ++++++++++++++++++
 package/libnss/libnss.hash                    |   4 +-
 package/libnss/libnss.mk                      |   7 +-
 4 files changed, 135 insertions(+), 54 deletions(-)
 delete mode 100644 package/libnss/0001-Bug-1614183-Check-if-PPC-__has_include-sys-auxv.h.patch
 create mode 100644 package/libnss/0001-Bug-1620799-Introduce-NSS_DISABLE_GCM_ARM32_NEON.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com