From: Giulio Benetti Date: Thu, 12 Dec 2019 14:01:18 +0000 (+0100) Subject: package/libnss: remove patch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92625702e4afd7b497f8bb77c5ed6d8023ff63d3;p=buildroot.git package/libnss: remove patch Remove uClibc fix patch since its change has been upstreamed despite the comment contained in patch. Signed-off-by: Giulio Benetti Signed-off-by: Thomas Petazzoni --- diff --git a/package/libnss/0001-add-zlib-include-dir-variable.patch b/package/libnss/0001-add-zlib-include-dir-variable.patch new file mode 100644 index 0000000000..cd0bdeec31 --- /dev/null +++ b/package/libnss/0001-add-zlib-include-dir-variable.patch @@ -0,0 +1,49 @@ +Add ZLIB_INCLUDE_DIR variable + +On Linux platform[1], the build system forces to use zlib from the +system instead of compiling the one located intree. + +The following error is raised when the zlib header is installed +somewhere else than in the default system include path: + + ssl3con.c:39:18: fatal error: zlib.h: No such file or directory + #include "zlib.h" + +The same trick setup for sqlite include directory is reproduced for +zlib. The build system disallows in any manner to give arguments to the +compiler explicity. + +The variable ZLIB_INCLUDE_DIR point to the directory where the zlib +header is located. + +[1]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/coreconf/Linux.mk#l180 +[2]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/lib/softoken/manifest.mn#l17 + +Signed-off-by: Gaël PORTAY + +--- libnss-3.33.orig/nss/lib/ssl/manifest.mn 2017-09-20 02:47:27.000000000 -0400 ++++ libnss-3.33/nss/lib/ssl/manifest.mn 2018-02-16 16:45:41.512709898 -0500 +@@ -6,6 +6,10 @@ + + # DEFINES = -DTRACE + ++ifdef ZLIB_INCLUDE_DIR ++INCLUDES += -I$(ZLIB_INCLUDE_DIR) ++endif ++ + EXPORTS = \ + ssl.h \ + sslt.h \ +--- host-libnss-3.33.orig/nss/cmd/signtool/manifest.mn.orig 2018-02-16 17:08:58.474777871 -0500 ++++ host-libnss-3.33/nss/cmd/signtool/manifest.mn 2018-02-16 17:09:22.603710963 -0500 +@@ -6,6 +6,10 @@ + + MODULE = nss + ++ifdef ZLIB_INCLUDE_DIR ++INCLUDES += -I$(ZLIB_INCLUDE_DIR) ++endif ++ + EXPORTS = + + CSRCS = signtool.c \ diff --git a/package/libnss/0001-fix-uclibc-build.patch b/package/libnss/0001-fix-uclibc-build.patch deleted file mode 100644 index a9e84c264b..0000000000 --- a/package/libnss/0001-fix-uclibc-build.patch +++ /dev/null @@ -1,22 +0,0 @@ -Fix build with uClibc-ng - -The elf.h header in uClibc-ng is missing the AT_HWCAP2 definition. Add it in -the code. - -Signed-off-by: Baruch Siach ---- -Upstream status: Not upstreamable; uClibc needs to update elf.h - -diff -Nuar nss-3.38.orig/nss/lib/freebl/blinit.c nss-3.38/nss/lib/freebl/blinit.c ---- nss-3.38.orig/nss/lib/freebl/blinit.c 2018-06-21 12:24:45.000000000 +0300 -+++ nss-3.38/nss/lib/freebl/blinit.c 2018-06-26 13:13:55.636434720 +0300 -@@ -100,6 +100,9 @@ - defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__) - #include - extern unsigned long getauxval(unsigned long type) __attribute__((weak)); -+#ifndef AT_HWCAP2 -+#define AT_HWCAP2 26 -+#endif - #else - static unsigned long (*getauxval)(unsigned long) = NULL; - #define AT_HWCAP2 0 diff --git a/package/libnss/0002-Bug-1602288-Fix-build-failure-due-to-missing-posix-s.patch b/package/libnss/0002-Bug-1602288-Fix-build-failure-due-to-missing-posix-s.patch new file mode 100644 index 0000000000..95e7b2bb56 --- /dev/null +++ b/package/libnss/0002-Bug-1602288-Fix-build-failure-due-to-missing-posix-s.patch @@ -0,0 +1,26 @@ +From 2e1b003600156e4adcb88998eabf18addee45be1 Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Sun, 8 Dec 2019 11:57:45 +0100 +Subject: [PATCH] Bug 1602288 - Fix build failure due to missing posix signal.h + +Signed-off-by: Giulio Benetti +--- + nss/coreconf/Linux.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk +index d07f8a3c5..854d3ca96 100644 +--- a/nss/coreconf/Linux.mk ++++ b/nss/coreconf/Linux.mk +@@ -21,7 +21,7 @@ ifeq ($(USE_PTHREADS),1) + endif + + DEFAULT_COMPILER = gcc +-DEFINES += -D_DEFAULT_SOURCE -D_BSD_SOURCE ++DEFINES += -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE + + ifeq ($(OS_TARGET),Android) + ifndef ANDROID_NDK +-- +2.20.1 + diff --git a/package/libnss/0002-add-zlib-include-dir-variable.patch b/package/libnss/0002-add-zlib-include-dir-variable.patch deleted file mode 100644 index cd0bdeec31..0000000000 --- a/package/libnss/0002-add-zlib-include-dir-variable.patch +++ /dev/null @@ -1,49 +0,0 @@ -Add ZLIB_INCLUDE_DIR variable - -On Linux platform[1], the build system forces to use zlib from the -system instead of compiling the one located intree. - -The following error is raised when the zlib header is installed -somewhere else than in the default system include path: - - ssl3con.c:39:18: fatal error: zlib.h: No such file or directory - #include "zlib.h" - -The same trick setup for sqlite include directory is reproduced for -zlib. The build system disallows in any manner to give arguments to the -compiler explicity. - -The variable ZLIB_INCLUDE_DIR point to the directory where the zlib -header is located. - -[1]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/coreconf/Linux.mk#l180 -[2]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/lib/softoken/manifest.mn#l17 - -Signed-off-by: Gaël PORTAY - ---- libnss-3.33.orig/nss/lib/ssl/manifest.mn 2017-09-20 02:47:27.000000000 -0400 -+++ libnss-3.33/nss/lib/ssl/manifest.mn 2018-02-16 16:45:41.512709898 -0500 -@@ -6,6 +6,10 @@ - - # DEFINES = -DTRACE - -+ifdef ZLIB_INCLUDE_DIR -+INCLUDES += -I$(ZLIB_INCLUDE_DIR) -+endif -+ - EXPORTS = \ - ssl.h \ - sslt.h \ ---- host-libnss-3.33.orig/nss/cmd/signtool/manifest.mn.orig 2018-02-16 17:08:58.474777871 -0500 -+++ host-libnss-3.33/nss/cmd/signtool/manifest.mn 2018-02-16 17:09:22.603710963 -0500 -@@ -6,6 +6,10 @@ - - MODULE = nss - -+ifdef ZLIB_INCLUDE_DIR -+INCLUDES += -I$(ZLIB_INCLUDE_DIR) -+endif -+ - EXPORTS = - - CSRCS = signtool.c \ diff --git a/package/libnss/0003-Bug-1602288-Fix-build-failure-due-to-missing-posix-s.patch b/package/libnss/0003-Bug-1602288-Fix-build-failure-due-to-missing-posix-s.patch deleted file mode 100644 index 95e7b2bb56..0000000000 --- a/package/libnss/0003-Bug-1602288-Fix-build-failure-due-to-missing-posix-s.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2e1b003600156e4adcb88998eabf18addee45be1 Mon Sep 17 00:00:00 2001 -From: Giulio Benetti -Date: Sun, 8 Dec 2019 11:57:45 +0100 -Subject: [PATCH] Bug 1602288 - Fix build failure due to missing posix signal.h - -Signed-off-by: Giulio Benetti ---- - nss/coreconf/Linux.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk -index d07f8a3c5..854d3ca96 100644 ---- a/nss/coreconf/Linux.mk -+++ b/nss/coreconf/Linux.mk -@@ -21,7 +21,7 @@ ifeq ($(USE_PTHREADS),1) - endif - - DEFAULT_COMPILER = gcc --DEFINES += -D_DEFAULT_SOURCE -D_BSD_SOURCE -+DEFINES += -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE - - ifeq ($(OS_TARGET),Android) - ifndef ANDROID_NDK --- -2.20.1 - diff --git a/package/libnss/0003-Bug-1602743-Fix-PowerPc-build-sys-auxv.h-failure.patch b/package/libnss/0003-Bug-1602743-Fix-PowerPc-build-sys-auxv.h-failure.patch new file mode 100644 index 0000000000..c8f12d777a --- /dev/null +++ b/package/libnss/0003-Bug-1602743-Fix-PowerPc-build-sys-auxv.h-failure.patch @@ -0,0 +1,40 @@ +From efe0fd875c80ff6e3a05db6c5e15b07c173530a6 Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Tue, 10 Dec 2019 13:06:01 +0100 +Subject: [PATCH] Bug 1602743 - Fix PowerPc build sys/auxv.h failure + +Signed-off-by: Giulio Benetti +--- + nss/lib/freebl/blinit.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/nss/lib/freebl/blinit.c b/nss/lib/freebl/blinit.c +index 959109b60..f0654595d 100644 +--- a/nss/lib/freebl/blinit.c ++++ b/nss/lib/freebl/blinit.c +@@ -357,7 +357,9 @@ ppc_crypto_support() + + #if defined(__powerpc__) + ++#if (__has_include()) + #include ++#endif + + // Defines from cputable.h in Linux kernel - PPC, letting us build on older kernels + #ifndef PPC_FEATURE2_VEC_CRYPTO +@@ -368,8 +370,11 @@ static void + CheckPPCSupport() + { + char *disable_hw_crypto = PR_GetEnvSecure("NSS_DISABLE_PPC_GHASH"); ++ long hwcaps = 0; + +- long hwcaps = getauxval(AT_HWCAP2); ++#if (__has_include()) ++ hwcaps = getauxval(AT_HWCAP2); ++#endif + + ppc_crypto_support_ = hwcaps & PPC_FEATURE2_VEC_CRYPTO && disable_hw_crypto == NULL; + } +-- +2.20.1 + diff --git a/package/libnss/0004-Bug-1602743-Fix-PowerPc-build-sys-auxv.h-failure.patch b/package/libnss/0004-Bug-1602743-Fix-PowerPc-build-sys-auxv.h-failure.patch deleted file mode 100644 index c8f12d777a..0000000000 --- a/package/libnss/0004-Bug-1602743-Fix-PowerPc-build-sys-auxv.h-failure.patch +++ /dev/null @@ -1,40 +0,0 @@ -From efe0fd875c80ff6e3a05db6c5e15b07c173530a6 Mon Sep 17 00:00:00 2001 -From: Giulio Benetti -Date: Tue, 10 Dec 2019 13:06:01 +0100 -Subject: [PATCH] Bug 1602743 - Fix PowerPc build sys/auxv.h failure - -Signed-off-by: Giulio Benetti ---- - nss/lib/freebl/blinit.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/nss/lib/freebl/blinit.c b/nss/lib/freebl/blinit.c -index 959109b60..f0654595d 100644 ---- a/nss/lib/freebl/blinit.c -+++ b/nss/lib/freebl/blinit.c -@@ -357,7 +357,9 @@ ppc_crypto_support() - - #if defined(__powerpc__) - -+#if (__has_include()) - #include -+#endif - - // Defines from cputable.h in Linux kernel - PPC, letting us build on older kernels - #ifndef PPC_FEATURE2_VEC_CRYPTO -@@ -368,8 +370,11 @@ static void - CheckPPCSupport() - { - char *disable_hw_crypto = PR_GetEnvSecure("NSS_DISABLE_PPC_GHASH"); -+ long hwcaps = 0; - -- long hwcaps = getauxval(AT_HWCAP2); -+#if (__has_include()) -+ hwcaps = getauxval(AT_HWCAP2); -+#endif - - ppc_crypto_support_ = hwcaps & PPC_FEATURE2_VEC_CRYPTO && disable_hw_crypto == NULL; - } --- -2.20.1 - diff --git a/package/libnss/0004-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch b/package/libnss/0004-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch new file mode 100644 index 0000000000..631d97d11f --- /dev/null +++ b/package/libnss/0004-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch @@ -0,0 +1,29 @@ +From 1ba8516045bc8a13fd72e1a85206a04b29d96758 Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Thu, 12 Dec 2019 12:57:29 +0100 +Subject: [PATCH] Bug 1603398 - Fix nsinstall.c build failure on RHEL 7 + +In Linux.mk -DLINUX and -Dlinux must be passed to DEFINES, not +OS_CFLAGS. + +Signed-off-by: Giulio Benetti +--- + nss/coreconf/Linux.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk +index d07f8a3c5..4b45a6054 100644 +--- a/nss/coreconf/Linux.mk ++++ b/nss/coreconf/Linux.mk +@@ -132,7 +132,7 @@ endif + + OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR + ifeq ($(KERNEL),Linux) +- OS_CFLAGS += -DLINUX -Dlinux ++ DEFINES += -DLINUX -Dlinux + endif + OS_LIBS = $(OS_PTHREAD) -ldl -lc + +-- +2.20.1 + diff --git a/package/libnss/0005-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch b/package/libnss/0005-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch deleted file mode 100644 index 631d97d11f..0000000000 --- a/package/libnss/0005-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1ba8516045bc8a13fd72e1a85206a04b29d96758 Mon Sep 17 00:00:00 2001 -From: Giulio Benetti -Date: Thu, 12 Dec 2019 12:57:29 +0100 -Subject: [PATCH] Bug 1603398 - Fix nsinstall.c build failure on RHEL 7 - -In Linux.mk -DLINUX and -Dlinux must be passed to DEFINES, not -OS_CFLAGS. - -Signed-off-by: Giulio Benetti ---- - nss/coreconf/Linux.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk -index d07f8a3c5..4b45a6054 100644 ---- a/nss/coreconf/Linux.mk -+++ b/nss/coreconf/Linux.mk -@@ -132,7 +132,7 @@ endif - - OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR - ifeq ($(KERNEL),Linux) -- OS_CFLAGS += -DLINUX -Dlinux -+ DEFINES += -DLINUX -Dlinux - endif - OS_LIBS = $(OS_PTHREAD) -ldl -lc - --- -2.20.1 -