Skip to contentSkip to conversation

mozjs_17.0.0: Fix build error in powerpc(e500v2)

PATCH New Lei Maohui 1 participant 1 message Jan 27, 2015

lore
Share & tools
lore

Lei Maohui

author
#0 lore raw

PATCH 1/1 mozjs_17.0.0: Fix build error in powerpc(e500v2)

To fix the bug as following

error: cannot convert '__va_list_tag**' to '__va_list_tag (*)[1]' for argument '5' to 'JSBool TryArgumentFormatter(JSContext*, const char**, JSBool, jsval**, __va_list_tag (*)[1])'

---
 ...ozjs17.0.0-fix-the-compile-bug-of-powerpc.patch | 36 ++++++++++++++++++++++
 meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb     |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta-oe/recipes-extended/mozjs/mozjs/0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch
meta-oe/recipes-extended/mozjs/mozjs/0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch new file +36 -0
new file mode 100644
index 0000000..de72d4f
@@ -0,0 +1,36 @@
+From da3929a96d9c74e11bf37d128890e18fcb745365 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Mon, 26 Jan 2015 08:53:19 +0900
+Subject: [PATCH] mozjs17.0.0: fix the compile bug of powerpc
+
+To fix the bug as following
+
+error: cannot convert '__va_list_tag**' to '__va_list_tag (*)[1]' for
+argument '5' to 'JSBool TryArgumentFormatter(JSContext*, const char**,
+JSBool, jsval**, __va_list_tag (*)[1])'
+
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ jscpucfg.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/jscpucfg.h b/jscpucfg.h
+index dfb1c14..8683491 100644
+--- a/jscpucfg.h
++++ b/jscpucfg.h
+@@ -47,6 +47,12 @@
+ #elif defined(JS_HAVE_ENDIAN_H)
+ # include <endian.h>
+ 
++#if defined(_POWER) || defined(__powerpc__) || \
++    defined(__ppc__)
++# define HAVE_VA_LIST_AS_ARRAY 1
++# endif
++
++
+ # if defined(__BYTE_ORDER)
+ #  if __BYTE_ORDER == __LITTLE_ENDIAN
+ #   define IS_LITTLE_ENDIAN 1
+-- 
+1.8.4.2
+
meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb +1 -0
index ab01471..174f6fe 100644
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://../../LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
 SRC_URI = " \
     http://ftp.mozilla.org/pub/mozilla.org/js/${BPN}${PV}.tar.gz \
     file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
+    file://0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch \
 "
 SRC_URI[md5sum] = "20b6f8f1140ef6e47daa3b16965c9202"
 SRC_URI[sha256sum] = "321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba"
Signature · 1 line
1.8.4.2