All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 04/28] nss: update to 3.48
Date: Wed,  8 Jan 2020 14:27:35 +0100	[thread overview]
Message-ID: <20200108132759.95603-4-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20200108132759.95603-1-alex.kanavin@gmail.com>

Drop a backport, and a patch that causes build errors with
the new version.

Add a patch to make ARM HW crypto optional; upstream for some
reason does not allow disabling it.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...ppc64-inline-assembler-for-clang-r-j.patch | 35 ------------------
 ...figure-option-to-disable-ARM-HW-cryp.patch | 35 ++++++++++++++++++
 .../nss/nss/nss-fix-nsinstall-build.patch     | 36 -------------------
 .../nss/{nss_3.45.bb => nss_3.48.bb}          | 12 ++++---
 4 files changed, 43 insertions(+), 75 deletions(-)
 delete mode 100644 meta/recipes-support/nss/nss/0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch
 create mode 100644 meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
 delete mode 100644 meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
 rename meta/recipes-support/nss/{nss_3.45.bb => nss_3.48.bb} (94%)

diff --git a/meta/recipes-support/nss/nss/0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch b/meta/recipes-support/nss/nss/0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch
deleted file mode 100644
index 59e44e68418..00000000000
--- a/meta/recipes-support/nss/nss/0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 6b351dbb049b3b3ab6c0d51aa3c1c7fb3c9df80c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
-Date: Mon, 22 Jul 2019 11:07:41 -0700
-Subject: [PATCH] Bug 1493916 - Fix ppc64 inline assembler for clang r=jcj
- Seems clang's inline assembler doesn't want registers to be prefixed with
- "r", while gcc accepts both - r0 and 0 for GPR0.
-
-tested with clang 6.0 and gcc 8.1
-
---HG--
-extra : amend_source : 87e09bb59c78bdb25b9573b9f29511e10b9db6fa
-extra : histedit_source : 9b3fad70ac2851bf7de14d42c34db4a5fba41710
-
-Upstream-Status: Backport [https://github.com/nss-dev/nss/commit/671d89b6c4a6f41707bb044534751098e2e3f211]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- nss/lib/freebl/mpi/mpcpucache.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/nss/lib/freebl/mpi/mpcpucache.c b/nss/lib/freebl/mpi/mpcpucache.c
-index 336b4cc..2ad291f 100644
---- a/nss/lib/freebl/mpi/mpcpucache.c
-+++ b/nss/lib/freebl/mpi/mpcpucache.c
-@@ -727,7 +727,7 @@ static inline void
- dcbzl(char *array)
- {
-     register char *a asm("r2") = array;
--    __asm__ __volatile__("dcbzl %0,r0"
-+    __asm__ __volatile__("dcbzl %0,0"
-                          : "=r"(a)
-                          : "0"(a));
- }
--- 
-2.24.0
-
diff --git a/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch b/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
new file mode 100644
index 00000000000..fe29d198820
--- /dev/null
+++ b/meta/recipes-support/nss/nss/0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch
@@ -0,0 +1,35 @@
+From 5595e9651aca39af945931c73eb524a0f8bd130d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 18 Dec 2019 12:29:50 +0100
+Subject: [PATCH] freebl: add a configure option to disable ARM HW crypto
+
+Not all current hardware supports it, particularly anything
+prior to armv8 does not.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ nss/lib/freebl/Makefile | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
+index 06506f0..a8b015d 100644
+--- a/nss/lib/freebl/Makefile
++++ b/nss/lib/freebl/Makefile
+@@ -125,6 +125,8 @@ else
+         DEFINES += -DNSS_X86
+ endif
+ endif
++
++ifdef NSS_USE_ARM_HW_CRYPTO
+ ifeq ($(CPU_ARCH),aarch64)
+     DEFINES += -DUSE_HW_AES
+     EXTRA_SRCS += aes-armv8.c gcm-aarch64.c
+@@ -145,6 +147,7 @@ ifeq ($(CPU_ARCH),arm)
+         endif
+     endif
+ endif
++endif
+ 
+ ifeq ($(OS_TARGET),OSF1)
+     DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD
diff --git a/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
deleted file mode 100644
index 181c69adb04..00000000000
--- a/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Fix nss multilib build on openSUSE 11.x 32bit
-
-While building lib64-nss on openSUSE 11.x 32bit, the nsinstall will
-fail with error:
-
-* nsinstall.c:1:0: sorry, unimplemented: 64-bit mode not compiled
-
-It caused by the '-m64' option which passed to host gcc.
-
-The nsinstall was built first while nss starting to build, it only runs
-on host to install built files, it doesn't need any cross-compling or
-multilib build options. Just clean the ARCHFLAG and LDFLAGS to fix this
-error.
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-===================================================
-Index: nss-3.24/nss/coreconf/nsinstall/Makefile
-===================================================================
---- nss-3.24.orig/nss/coreconf/nsinstall/Makefile
-+++ nss-3.24/nss/coreconf/nsinstall/Makefile
-@@ -18,6 +18,13 @@ INTERNAL_TOOLS  = 1
- 
- include $(DEPTH)/coreconf/config.mk
- 
-+# nsinstall is unfit for cross-compiling/multilib-build since it was
-+# always run on local host to install built files. This change intends
-+# to clean the '-m64' from ARCHFLAG and LDFLAGS.
-+ARCHFLAG =
-+LDFLAGS =
-+CFLAGS =
-+
- ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
- PROGRAM		=
- else
diff --git a/meta/recipes-support/nss/nss_3.45.bb b/meta/recipes-support/nss/nss_3.48.bb
similarity index 94%
rename from meta/recipes-support/nss/nss_3.45.bb
rename to meta/recipes-support/nss/nss_3.48.bb
index c8005a5b3a5..6ddccd7b902 100644
--- a/meta/recipes-support/nss/nss_3.45.bb
+++ b/meta/recipes-support/nss/nss_3.48.bb
@@ -25,17 +25,16 @@ SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSIO
            file://0001-nss-fix-support-cross-compiling.patch \
            file://nss-no-rpath-for-cross-compiling.patch \
            file://nss-fix-incorrect-shebang-of-perl.patch \
-           file://nss-fix-nsinstall-build.patch \
            file://disable-Wvarargs-with-clang.patch \
            file://pqg.c-ULL_addend.patch \
-           file://0001-Bug-1493916-Fix-ppc64-inline-assembler-for-clang-r-j.patch \
            file://blank-cert9.db \
            file://blank-key4.db \
            file://system-pkcs11.txt \
+           file://0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch \
            "
 
-SRC_URI[md5sum] = "f1752d7223ee9d910d551e57264bafa8"
-SRC_URI[sha256sum] = "112f05223d1fde902c170966bfc6f011b24a838be16969b110ecf2bb7bc24e8b"
+SRC_URI[md5sum] = "7855014d8653aec66106ad910487a9c9"
+SRC_URI[sha256sum] = "3f9c822a86a4e3e1bfe63e2ed0f922d8b7c2e0b7cafe36774b1c627970d0f8ac"
 
 UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
 UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
@@ -47,6 +46,9 @@ TDS = "${S}/tentative-dist-staging"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
+# Needed on Centos 7, as nss auto-detection fails there due to non-standard uname output
+CFLAGS_append_class-native = " -DLINUX -Dlinux"
+
 do_configure_prepend_libc-musl () {
     sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
 }
@@ -81,6 +83,8 @@ do_compile() {
     export NSS_USE_SYSTEM_SQLITE=1
     export NSS_ENABLE_ECC=1
 
+    ${@bb.utils.contains("TUNE_FEATURES", "crypto", "export NSS_USE_ARM_HW_CRYPTO=1", "", d)}
+
     export OS_RELEASE=3.4
     export OS_TARGET=Linux
     export OS_ARCH=Linux
-- 
2.17.1



  parent reply	other threads:[~2020-01-08 13:28 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 13:27 [PATCH 01/28] rpm: upgrade to 4.15.1 Alexander Kanavin
2020-01-08 13:27 ` [PATCH 02/28] rpm: switch to openssl from nss Alexander Kanavin
2020-01-08 13:27 ` [PATCH 03/28] rpm: fix with musl and latest elfutils Alexander Kanavin
2020-01-08 13:27 ` Alexander Kanavin [this message]
2020-01-08 13:27 ` [PATCH 05/28] python3: update to 3.8.1 Alexander Kanavin
2020-01-08 23:02   ` Richard Purdie
2020-01-09  1:23     ` Khem Raj
2020-01-09 15:31     ` Alexander Kanavin
2020-01-09 19:28       ` André Draszik
2020-01-09 19:37         ` André Draszik
2020-01-09 19:49           ` Alexander Kanavin
2020-01-09 22:14             ` Richard Purdie
2020-01-13 14:15               ` Alexander Kanavin
2020-01-14 10:23                 ` Richard Purdie
2020-01-14 12:19                   ` Alexander Kanavin
2020-01-14 18:37                     ` Richard Purdie
2020-01-15 18:26                       ` Alexander Kanavin
2020-01-08 13:27 ` [PATCH 06/28] gstreamer1.0-python: add a patch to fix python 3.8 builds Alexander Kanavin
2020-01-08 13:27 ` [PATCH 07/28] acl/attr: update to latest upstream releases Alexander Kanavin
2020-01-09  1:30   ` Khem Raj
2020-01-10 11:02   ` Richard Purdie
2020-01-10 14:48     ` Alexander Kanavin
2020-01-08 13:27 ` [PATCH 08/28] pseudo: adjust for attr 2.4.48 Alexander Kanavin
2020-01-08 13:27 ` [PATCH 09/28] ltp: update to 20190930 Alexander Kanavin
2020-01-09  9:15   ` Richard Purdie
2020-01-08 13:27 ` [PATCH 10/28] resolvconf: update to 1.82 Alexander Kanavin
2020-01-08 13:27 ` [PATCH 11/28] ifupdown: update 0.8.22 -> 0.8.35 Alexander Kanavin
2020-01-08 21:23   ` Richard Purdie
2020-01-09 13:47     ` Alexander Kanavin
2020-01-09 13:54       ` Alexander Kanavin
2020-01-09 13:55         ` Richard Purdie
2020-01-09 14:36           ` Alexander Kanavin
2020-01-09 14:44             ` Tom Rini
2020-01-09 14:47               ` Alexander Kanavin
2020-01-09 15:01                 ` Tom Rini
2020-01-09 15:33                   ` Alexander Kanavin
2020-01-09 15:55                     ` Tom Rini
2020-01-09 16:12                       ` Alexander Kanavin
2020-01-10 15:00                         ` Adrian Bunk
2020-01-10 15:12                           ` Alexander Kanavin
2020-01-15  1:10             ` Randy MacLeod
2020-01-08 13:27 ` [PATCH 12/28] ovmf: update to 201911 Alexander Kanavin
2020-01-08 13:27 ` [PATCH 13/28] elfutils: upgrade 0.177 -> 0.178 Alexander Kanavin
2020-01-09  1:27   ` Khem Raj
2020-01-08 13:27 ` [PATCH 14/28] libcap: update to 2.30 Alexander Kanavin
2020-01-08 21:22   ` Richard Purdie
2020-01-09  1:31     ` Khem Raj
2020-01-09 11:46       ` Adrian Bunk
2020-01-09 13:16         ` Alexander Kanavin
2020-01-08 13:27 ` [PATCH 15/28] virglrenderer: update to 0.8.1 Alexander Kanavin
2020-01-08 13:27 ` [PATCH 16/28] systemtap: remove the unneeded patch Alexander Kanavin
2020-01-08 13:27 ` [PATCH 17/28] lib/oe/package_manager.py: put the sdk_provides_dummy_target upfront Alexander Kanavin
2020-01-08 13:27 ` [PATCH 18/28] dummy-sdk-package.inc: do multilib expanesion for RREPLACES as well Alexander Kanavin
2020-01-08 13:27 ` [PATCH 19/28] staging.bbclass: correctly exclude ptest directories Alexander Kanavin
2020-01-08 13:27 ` [PATCH 20/28] ptest: report ptests that couldn't be run at all Alexander Kanavin
2020-01-08 13:27 ` [PATCH 21/28] ptest-packagelists.inc: add a couple of missed ptests Alexander Kanavin
2020-01-08 13:27 ` [PATCH 22/28] gzip: do not pull in perl-ptest for gzip-ptest Alexander Kanavin
2020-01-08 13:27 ` [PATCH 23/28] gettext: additional ptest fixing Alexander Kanavin
2020-01-08 13:27 ` [PATCH 24/28] gawk: fix failing ptests Alexander Kanavin
2020-01-08 13:27 ` [PATCH 25/28] kbd: " Alexander Kanavin
2020-01-08 13:27 ` [PATCH 26/28] perl: package Config.pm from arch directory into the main perl package Alexander Kanavin
2020-01-08 13:27 ` [PATCH 27/28] perl: install typemap and other extutils metadata as part of perl-core Alexander Kanavin
2020-01-08 13:27 ` [PATCH 28/28] libmodule-build-perl: fix ptests Alexander Kanavin
2020-01-08 13:32 ` ✗ patchtest: failure for "rpm: upgrade to 4.15.1..." and 27 more Patchwork

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=20200108132759.95603-4-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.