Skip to contentSkip to conversation

mozjs: Fix gold linker detection with py3

PATCH In review Khem Raj 2 participants 2 messages Feb 10, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 mozjs: Fix gold linker detection with py3

Cc Andreas Müller <[email protected]>
---
 .../mozjs/mozjs/python3_string_encoding.patch | 20 +++++++++++++++++++
 .../recipes-extended/mozjs/mozjs_60.9.0.bb    |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta-oe/recipes-extended/mozjs/mozjs/python3_string_encoding.patch
meta-oe/recipes-extended/mozjs/mozjs/python3_string_encoding.patch new file +20 -0
new file mode 100644
index 0000000000..97eb012e83
@@ -0,0 +1,20 @@
+Fixes python3 erros like below
+
+AttributeError: 'bytes' object has no attribute 'encode'
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: firefox-60.9.0/build/moz.configure/toolchain.configure
+===================================================================
+--- firefox-60.9.0.orig/build/moz.configure/toolchain.configure
++++ firefox-60.9.0/build/moz.configure/toolchain.configure
+@@ -1518,7 +1518,7 @@ def enable_gnu_linker(enable_gold_option
+         if not gold:
+             return
+ 
+-        goldFullPath = find_program(gold)
++        goldFullPath = find_program(gold.decode())
+         if goldFullPath is None:
+             return
+ 
meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb +1 -0
index 9466c62aac..b7731c7a2a 100644
@@ -19,6 +19,7 @@ SRC_URI = " \
     file://0012-JS_PUBLIC_API.patch \
     file://0013-riscv-Disable-atomic-operations.patch \
     file://0014-fallback-to-2011-C++-standard.patch \
+    file://python3_string_encoding.patch \
 "
 SRC_URI_append_libc-musl = " \
     file://musl/0001-support-musl.patch \
Signature · 1 line
2.25.0
#1 lore raw
Quoted 40 lines · Khem Raj
Cc Andreas Müller <[email protected]>
---
 .../mozjs/mozjs/python3_string_encoding.patch | 20 +++++++++++++++++++
 .../recipes-extended/mozjs/mozjs_60.9.0.bb    |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta-oe/recipes-extended/mozjs/mozjs/python3_string_encoding.patch
meta-oe/recipes-extended/mozjs/mozjs/python3_string_encoding.patch new file +20 -0
new file mode 100644
index 0000000000..97eb012e83
@@ -0,0 +1,20 @@
+Fixes python3 erros like below
+
+AttributeError: 'bytes' object has no attribute 'encode'
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: firefox-60.9.0/build/moz.configure/toolchain.configure
+===================================================================
+--- firefox-60.9.0.orig/build/moz.configure/toolchain.configure
++++ firefox-60.9.0/build/moz.configure/toolchain.configure
+@@ -1518,7 +1518,7 @@ def enable_gnu_linker(enable_gold_option
+         if not gold:
+             return
+
+-        goldFullPath = find_program(gold)
++        goldFullPath = find_program(gold.decode())
+         if goldFullPath is None:
+             return
+
meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb +0 -0
index 9466c62aac..b7731c7a2a 100644

meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb SRC_URI = " \ · line 22

Quoted 4 lines
meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = " \
     file://0012-JS_PUBLIC_API.patch \
     file://0013-riscv-Disable-atomic-operations.patch \
     file://0014-fallback-to-2011-C++-standard.patch \
+    file://python3_string_encoding.patch \

Just sent out similar. Would prefer to keep single patch for py3 at first position. Just in the unlikely case others want to use it :)

Andreas