diff mbox series

[oe,meta-oe,13/18] mozjs: Remove -Werror=format from CXXFLAGS

Message ID 20181223213557.7834-13-raj.khem@gmail.com
State Accepted
Commit e1db44b73fe5b32f14940678db46668bdc609d55
Headers show
Series [oe,meta-oe,01/18] modemmanager: Fix build with gcc9 | expand

Commit Message

Khem Raj Dec. 23, 2018, 9:35 p.m. UTC
This is to make way for gcc9 since it spews some extra warnings
which need to be eventually fixed

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../mozjs/mozjs/format-overflow.patch         | 21 +++++++++++++++++++
 .../recipes-extended/mozjs/mozjs_52.9.1.bb    |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch

-- 
2.20.1

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch b/meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch
new file mode 100644
index 0000000000..29c6a7b69c
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs/format-overflow.patch
@@ -0,0 +1,21 @@ 
+Drop enable format string warnings to help gcc9
+
+Fixes
+| /mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/mozjs/52.9.1-r0/mozjs-52.9.1/js/src/jit/x64/BaseAssembler-x64.h:596:13: error: '%s' directive argument is null [-Werror=format-overflow=]
+|   596 |         spew("movq       " MEM_obs ", %s", ADDR_obs(offset, base, index, scale), GPReg64Name(dst));
+|       |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Inappropriate [Workaround for gcc9]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/js/src/moz.build
++++ b/js/src/moz.build
+@@ -785,7 +785,7 @@ if CONFIG['JS_HAS_CTYPES']:
+         DEFINES['FFI_BUILDING'] = True
+ 
+ if CONFIG['GNU_CXX']:
+-    CXXFLAGS += ['-Wno-shadow', '-Werror=format']
++    CXXFLAGS += ['-Wno-shadow']
+ 
+ # Suppress warnings in third-party code.
+ if CONFIG['CLANG_CXX']:
diff --git a/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb b/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb
index 440a25b74e..a28ecc57d6 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb
@@ -14,6 +14,7 @@  SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/m/mozjs52/mozjs52_52.9.1.o
            file://disable-mozglue-in-stand-alone-builds.patch \
            file://add-riscv-support.patch \
            file://0001-mozjs-fix-coredump-caused-by-getenv.patch \
+           file://format-overflow.patch \
            "
 SRC_URI_append_libc-musl = " \
            file://0006-support-musl.patch \