summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch33
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch11
-rw-r--r--meta/recipes-support/nss/nss_3.24.bb2
3 files changed, 41 insertions, 5 deletions
diff --git a/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch b/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
new file mode 100644
index 0000000000..86b1b60556
--- /dev/null
+++ b/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
@@ -0,0 +1,33 @@
1clang 3.9 add this warning to rightly flag undefined
2behavior, we relegate this to be just a warning instead
3of error and keep the behavior as it was. Right fix would
4be to not pass enum to the function with variadic arguments
5as last named argument
6
7Fixes errors like
8ocsp.c:2220:22: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
9 va_start(ap, responseType0);
10 ^
11ocsp.c:2200:43: note: parameter of type 'SECOidTag' is declared here
12 SECOidTag responseType0, ...)
13
14see
15https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start
16for more details
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19Upstream-Status: Pending
20
21Index: nss-3.24/nss/coreconf/Werror.mk
22===================================================================
23--- nss-3.24.orig/nss/coreconf/Werror.mk
24+++ nss-3.24/nss/coreconf/Werror.mk
25@@ -54,7 +54,7 @@ ifndef WARNING_CFLAGS
26 ifdef CC_IS_CLANG
27 # -Qunused-arguments : clang objects to arguments that it doesn't understand
28 # and fixing this would require rearchitecture
29- WARNING_CFLAGS += -Qunused-arguments
30+ WARNING_CFLAGS += -Qunused-arguments -Wno-error=varargs
31 # -Wno-parentheses-equality : because clang warns about macro expansions
32 WARNING_CFLAGS += $(call disable_warning,parentheses-equality)
33 ifdef BUILD_OPT
diff --git a/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
index 866de07ea8..181c69adb0 100644
--- a/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
+++ b/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
@@ -16,11 +16,11 @@ Upstream-Status: Pending
16 16
17Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> 17Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
18=================================================== 18===================================================
19diff --git a/nss/coreconf/nsinstall/Makefile b/nss/coreconf/nsinstall/Makefile 19Index: nss-3.24/nss/coreconf/nsinstall/Makefile
20index 1850bcb..5aee84f 100644 20===================================================================
21--- a/nss/coreconf/nsinstall/Makefile 21--- nss-3.24.orig/nss/coreconf/nsinstall/Makefile
22+++ b/nss/coreconf/nsinstall/Makefile 22+++ nss-3.24/nss/coreconf/nsinstall/Makefile
23@@ -18,6 +18,12 @@ INTERNAL_TOOLS = 1 23@@ -18,6 +18,13 @@ INTERNAL_TOOLS = 1
24 24
25 include $(DEPTH)/coreconf/config.mk 25 include $(DEPTH)/coreconf/config.mk
26 26
@@ -29,6 +29,7 @@ index 1850bcb..5aee84f 100644
29+# to clean the '-m64' from ARCHFLAG and LDFLAGS. 29+# to clean the '-m64' from ARCHFLAG and LDFLAGS.
30+ARCHFLAG = 30+ARCHFLAG =
31+LDFLAGS = 31+LDFLAGS =
32+CFLAGS =
32+ 33+
33 ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET))) 34 ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
34 PROGRAM = 35 PROGRAM =
diff --git a/meta/recipes-support/nss/nss_3.24.bb b/meta/recipes-support/nss/nss_3.24.bb
index 95a33f27d3..caed7fa894 100644
--- a/meta/recipes-support/nss/nss_3.24.bb
+++ b/meta/recipes-support/nss/nss_3.24.bb
@@ -20,6 +20,7 @@ SRC_URI = "\
20 file://nss-no-rpath-for-cross-compiling.patch \ 20 file://nss-no-rpath-for-cross-compiling.patch \
21 file://nss-fix-incorrect-shebang-of-perl.patch \ 21 file://nss-fix-incorrect-shebang-of-perl.patch \
22 file://nss-fix-nsinstall-build.patch \ 22 file://nss-fix-nsinstall-build.patch \
23 file://disable-Wvarargs-with-clang.patch \
23 file://nss.pc.in \ 24 file://nss.pc.in \
24 file://signlibs.sh \ 25 file://signlibs.sh \
25" 26"
@@ -62,6 +63,7 @@ do_compile_prepend_class-native() {
62do_compile() { 63do_compile() {
63 export CROSS_COMPILE=1 64 export CROSS_COMPILE=1
64 export NATIVE_CC="gcc" 65 export NATIVE_CC="gcc"
66 export NATIVE_FLAGS="${HOST_CFLAGS}"
65 export BUILD_OPT=1 67 export BUILD_OPT=1
66 68
67 export FREEBL_NO_DEPEND=1 69 export FREEBL_NO_DEPEND=1