From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] nss: update to 3.53.
Date: Tue, 02 Jun 2020 04:02:08 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22509@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
There is a new pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages nss-3.53
https://github.com/void-linux/void-packages/pull/22509
nss: update to 3.53.
- Automated test is running for `x86_64`.
- Manual test haven't done yet.
- Planning a test on qemu-x86_64 without avx2
---
@q66 please check for PowerPC
A patch file from https://github.com/void-linux/void-packages/pull/22509.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nss-3.53-22509.patch --]
[-- Type: text/x-diff, Size: 5357 bytes --]
From 6545b495dc73212d7bea4fdf89efd6fa3e6b37b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 31 May 2020 10:10:03 +0700
Subject: [PATCH] nss: update to 3.53.
---
...-enable-AVX2-if-applicable-on-x86_64.patch | 80 +++++++++++++++++++
srcpkgs/nss/template | 13 ++-
2 files changed, 85 insertions(+), 8 deletions(-)
create mode 100644 srcpkgs/nss/patches/0001-enable-AVX2-if-applicable-on-x86_64.patch
diff --git a/srcpkgs/nss/patches/0001-enable-AVX2-if-applicable-on-x86_64.patch b/srcpkgs/nss/patches/0001-enable-AVX2-if-applicable-on-x86_64.patch
new file mode 100644
index 00000000000..f410c8ad855
--- /dev/null
+++ b/srcpkgs/nss/patches/0001-enable-AVX2-if-applicable-on-x86_64.patch
@@ -0,0 +1,80 @@
+From f8d9ecea60d99c6143dcb9e2f8fe41c8e17e4d0f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
+ <congdanhqx@gmail.com>
+Date: Sun, 31 May 2020 12:13:08 +0700
+Subject: [PATCH] enable AVX2 if applicable on x86_64
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There's a runtime check for AVX2 before using, see:
+
+ lib/freebl/chacha20poly1305.c:140
+ lib/freebl/blinit.c:117
+
+Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
+---
+ nss/coreconf/arch.mk | 1 +
+ nss/coreconf/config.mk | 2 ++
+ nss/lib/freebl/Makefile | 9 +++++++--
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git nss/coreconf/arch.mk nss/coreconf/arch.mk
+index 790372d..cc13ced 100644
+--- nss/coreconf/arch.mk
++++ nss/coreconf/arch.mk
+@@ -116,6 +116,7 @@ ifeq ($(OS_ARCH),Linux)
+ OS_RELEASE := $(word 1,$(OS_RELEASE)).$(word 2,$(OS_RELEASE))
+ endif
+ KERNEL = Linux
++ include $(CORE_DEPTH)/coreconf/Linux.mk
+ endif
+
+ # Since all uses of OS_ARCH that follow affect only userland, we can
+diff --git nss/coreconf/config.mk nss/coreconf/config.mk
+index 39f755d..b65e684 100644
+--- nss/coreconf/config.mk
++++ nss/coreconf/config.mk
+@@ -149,8 +149,10 @@ DEFINES += -DNSS_DISABLE_DBM
+ endif
+
+ ifdef NSS_DISABLE_AVX2
++ifneq ($(NSS_DISABLE_AVX2),0)
+ DEFINES += -DNSS_DISABLE_AVX2
+ endif
++endif
+
+ ifdef NSS_DISABLE_CHACHAPOLY
+ DEFINES += -DNSS_DISABLE_CHACHAPOLY
+diff --git nss/lib/freebl/Makefile nss/lib/freebl/Makefile
+index 5f73844..8b98370 100644
+--- nss/lib/freebl/Makefile
++++ nss/lib/freebl/Makefile
+@@ -552,10 +552,12 @@ endif
+ ifndef NSS_DISABLE_CHACHAPOLY
+ ifeq ($(CPU_ARCH),x86_64)
+ ifndef NSS_DISABLE_AVX2
++ NSS_DISABLE_AVX2 = 0
++ endif
++ ifeq ($(NSS_DISABLE_AVX2),0)
+ EXTRA_SRCS += Hacl_Poly1305_256.c Hacl_Chacha20_Vec256.c Hacl_Chacha20Poly1305_256.c
+- else
+- EXTRA_SRCS += Hacl_Poly1305_128.c Hacl_Chacha20_Vec128.c Hacl_Chacha20Poly1305_128.c
+ endif # NSS_DISABLE_AVX2
++ EXTRA_SRCS += Hacl_Poly1305_128.c Hacl_Chacha20_Vec128.c Hacl_Chacha20Poly1305_128.c
+ endif # x86_64
+
+ VERIFIED_SRCS += Hacl_Poly1305_32.c Hacl_Chacha20.c Hacl_Chacha20Poly1305_32.c
+@@ -737,6 +739,9 @@ $(OBJDIR)/$(PROG_PREFIX)Hacl_Chacha20Poly1305_128$(OBJ_SUFFIX): CFLAGS += -mssse
+ $(OBJDIR)/$(PROG_PREFIX)Hacl_Poly1305_128$(OBJ_SUFFIX): CFLAGS += -mssse3 -msse4.1 -msse4.2 -mavx -maes -mpclmul
+
+ ifndef NSS_DISABLE_AVX2
++ NSS_DISABLE_AVX2 = 0
++endif
++ifeq ($(NSS_DISABLE_AVX2),0)
+ $(OBJDIR)/$(PROG_PREFIX)Hacl_Chacha20Poly1305_256$(OBJ_SUFFIX): CFLAGS += -mssse3 -msse4.1 -msse4.2 -mavx2 -maes
+ $(OBJDIR)/$(PROG_PREFIX)Hacl_Chacha20_Vec256$(OBJ_SUFFIX): CFLAGS += -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -maes
+ $(OBJDIR)/$(PROG_PREFIX)Hacl_Poly1305_256$(OBJ_SUFFIX): CFLAGS += -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -maes -mpclmul
+--
+2.26.2.672.g232c24e857
+
diff --git a/srcpkgs/nss/template b/srcpkgs/nss/template
index e7d616e8732..38d2dcde14f 100644
--- a/srcpkgs/nss/template
+++ b/srcpkgs/nss/template
@@ -3,17 +3,17 @@
_nsprver=4.25
pkgname=nss
-version=3.52.1
+version=3.53
revision=1
hostmakedepends="perl"
makedepends="nspr-devel sqlite-devel zlib-devel"
depends="nspr>=${_nsprver}"
short_desc="Mozilla Network Security Services"
-maintainer="Doan Tran Cong Danh <congdanhqx@gmail.com>"
+maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="MPL-2.0"
homepage="https://www.mozilla.org/projects/security/pki/nss"
distfiles="${MOZILLA_SITE}/security/nss/releases/NSS_${version//\./_}_RTM/src/nss-${version}.tar.gz"
-checksum=bcc81ac33aeb4ecad182dc21e34d2c97bcc148fd7b9e76f85bebb892405a9278
+checksum=08d36dc1a56325f02e626626d4eeab9c4d126dbd99dfaf419b91d0a696f58917
do_build() {
local _native_use64 _target_use64
@@ -75,17 +75,14 @@ do_build() {
export XCFLAGS="${CFLAGS}"
make CROSS_COMPILE=1 OS_TEST="${_ARCH}" NSINSTALL="${wrksrc}/nsinstall" \
- CC="$CC" CCC="$CXX" RANLIB="$RANLIB" ${_target_use64} -C lib/dbm
- make CROSS_COMPILE=1 OS_TEST="${_ARCH}" NSINSTALL="${wrksrc}/nsinstall" \
- CC="$CC" CCC="$CXX" RANLIB="$RANLIB" ${_target_use64}
+ CC="$CC" CCC="$CXX" RANLIB="$RANLIB" ${_target_use64} all
else
# native build
export NSPR_INCLUDE_DIR=/usr/include/nspr
export NSPR_LIB_DIR=/usr/lib
export XCFLAGS="${CFLAGS}"
- make ${_native_use64} -C lib/dbm
- make ${_native_use64}
+ make ${_native_use64} all
fi
}
reply other threads:[~2020-06-02 2:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22509@inbox.vuxu.org \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).