aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/mozjs
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/mozjs')
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-Cargo.toml-do-not-abort-on-panic.patch (renamed from meta-oe/recipes-extended/mozjs/mozjs-91/0001-Cargo.toml-do-not-abort-on-panic.patch)11
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-add-arm-to-list-of-mozinline.patch32
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch44
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch (renamed from meta-oe/recipes-extended/mozjs/mozjs-91/0001-rewrite-cargo-host-linker-in-python3.patch)10
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0001-util.configure-fix-one-occasionally-reproduced-confi.patch (renamed from meta-oe/recipes-extended/mozjs/mozjs-91/0001-util.configure-fix-one-occasionally-reproduced-confi.patch)10
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0002-moz.configure-do-not-look-for-llvm-objdump.patch (renamed from meta-oe/recipes-extended/mozjs/mozjs-91/0002-moz.configure-do-not-look-for-llvm-objdump.patch)17
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch (renamed from meta-oe/recipes-extended/mozjs/mozjs-91/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch)11
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/0004-use-asm-sgidefs.h.patch (renamed from meta-oe/recipes-extended/mozjs/mozjs-91/0004-use-asm-sgidefs.h.patch)9
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/armv5.patch19
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/fix-musl-build.patch29
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/musl-disable-stackwalk.patch27
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115/riscv32.patch (renamed from meta-oe/recipes-extended/mozjs/mozjs-91/riscv32.patch)27
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb (renamed from meta-oe/recipes-extended/mozjs/mozjs-91_91.13.0.bb)36
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-91/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch28
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-91/0005-nojit-32bit-arch-fix.patch21
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-91/0006-Fix-build-on-powerpc.patch36
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-91/fix-musl-build.patch15
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs-91/py-3.11.patch211
18 files changed, 235 insertions, 358 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-Cargo.toml-do-not-abort-on-panic.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-Cargo.toml-do-not-abort-on-panic.patch
index e09848f403..e8dfdea1e9 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-Cargo.toml-do-not-abort-on-panic.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-Cargo.toml-do-not-abort-on-panic.patch
@@ -1,4 +1,4 @@
-From 9e37248870b2b955293754933c789ca00bca06ef Mon Sep 17 00:00:00 2001
+From f501f7c02df4f0ff5d5f100d9eeb74cd4d12ea3d Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Fri, 1 Oct 2021 13:00:24 +0200
Subject: [PATCH] Cargo.toml: do not abort on panic
@@ -7,13 +7,16 @@ OE's rust is configured to unwind, and this setting clashes with it/
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+
---
- Cargo.toml | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
+ Cargo.toml | 2 --
+ 1 file changed, 2 deletions(-)
+diff --git a/Cargo.toml b/Cargo.toml
+index a2718b2f35..4e231c30e8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
-@@ -51,13 +51,11 @@ opt-level = 1
+@@ -59,13 +59,11 @@ opt-level = 1
rpath = false
lto = false
debug-assertions = true
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-add-arm-to-list-of-mozinline.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-add-arm-to-list-of-mozinline.patch
new file mode 100644
index 0000000000..83187861c7
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-add-arm-to-list-of-mozinline.patch
@@ -0,0 +1,32 @@
+From c5cfb8aa591afd5ad3aedc58fe7f410e89013605 Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Fri, 22 Sep 2023 22:59:59 +0000
+Subject: [PATCH] Backport patch from firefox bugzilla to fix compile error for
+ qemuarm with some armv7ve tunes such as 'armv7vethf' and 'armv7vet-vfpv3d16':
+
+| /path/to/build/tmp/work/armv7vet2hf-vfp-poky-linux-gnueabi/mozjs-102/102.5.0-r0/build/js/src/jit/AtomicOperationsGenerated.h:240:17:
+ error: 'asm' operand has impossible constraints
+| 240 | asm volatile (
+| | ^~~
+
+Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1761665]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ js/src/jit/GenerateAtomicOperations.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/js/src/jit/GenerateAtomicOperations.py b/js/src/jit/GenerateAtomicOperations.py
+index 24b5a191cf..e41948c5af 100644
+--- a/js/src/jit/GenerateAtomicOperations.py
++++ b/js/src/jit/GenerateAtomicOperations.py
+@@ -860,7 +860,7 @@ def generate_atomics_header(c_out):
+
+ # Work around a GCC issue on 32-bit x86 by adding MOZ_NEVER_INLINE.
+ # See bug 1756347.
+- if is_gcc and cpu_arch == "x86":
++ if is_gcc and cpu_arch in ("x86", "arm"):
+ contents = contents.replace("INLINE_ATTR", "MOZ_NEVER_INLINE inline")
+ else:
+ contents = contents.replace("INLINE_ATTR", "inline")
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
new file mode 100644
index 0000000000..38496ea56c
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
@@ -0,0 +1,44 @@
+From c860dcbe63b0e393c95bfb0131238f91aaac11d3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Thu, 7 Oct 2021 12:44:18 +0200
+Subject: [PATCH] build: do not use autoconf's config.sub to 'canonicalize'
+ names
+
+The outcome is that processed names no longer match our custom rust
+target definitions, and the build fails.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+
+---
+ build/moz.configure/init.configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/build/moz.configure/init.configure
++++ b/build/moz.configure/init.configure
+@@ -647,24 +647,7 @@ def help_host_target(help, host, target)
+
+ def config_sub(shell, triplet):
+ config_sub = os.path.join(os.path.dirname(__file__), "..", "autoconf", "config.sub")
+- # Config.sub doesn't like the *-windows-msvc/*-windows-gnu triplets, so
+- # munge those before and after calling config.sub.
+- suffix = None
+- munging = {
+- "-windows-msvc": "-mingw32",
+- "-windows-gnu": "-mingw32",
+- }
+- for check_suffix, replacement in munging.items():
+- if triplet.endswith(check_suffix):
+- suffix = check_suffix
+- triplet = triplet[: -len(suffix)] + replacement
+- break
+- result = check_cmd_output(shell, config_sub, triplet).strip()
+- if suffix:
+- assert result.endswith(replacement)
+- result = result[: -len(replacement)] + suffix
+- return result
+-
++ return triplet
+
+ @depends("--host", shell)
+ @checking("for host system type", lambda h: h.alias)
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-rewrite-cargo-host-linker-in-python3.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch
index 7b938179c3..83f384e6c2 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-rewrite-cargo-host-linker-in-python3.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-rewrite-cargo-host-linker-in-python3.patch
@@ -1,4 +1,4 @@
-From 9eceb43dd676afe2f675bd65ab369ba4d14f6537 Mon Sep 17 00:00:00 2001
+From c6a84863454b882695058187cd282987613474ef Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 18 Nov 2021 07:16:39 +0000
Subject: [PATCH] Rewrite cargo-host-linker in python3
@@ -18,12 +18,13 @@ rewrite cargo-host-linker in python3
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
---
- build/cargo-host-linker | 24 +++++++---
+ build/cargo-host-linker | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/build/cargo-host-linker b/build/cargo-host-linker
-index cbd0472bf7..ccd8bffec1 100755
+index cbd0472bf7..87d43ce9ec 100755
--- a/build/cargo-host-linker
+++ b/build/cargo-host-linker
@@ -1,3 +1,21 @@
@@ -51,6 +52,3 @@ index cbd0472bf7..ccd8bffec1 100755
+ args=[os.environ['MOZ_CARGO_WRAP_HOST_LD'].split()[0]] + sys.argv[1:]
+
+os.execvp(binary, args)
---
-2.33.1
-
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-util.configure-fix-one-occasionally-reproduced-confi.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
index 5472eddbbb..4921a9028c 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/0001-util.configure-fix-one-occasionally-reproduced-confi.patch
@@ -1,4 +1,4 @@
-From b13cad4abc53f816f64c8b0af70cb46820746c72 Mon Sep 17 00:00:00 2001
+From 0d28cd65efe14022e1d645db71dec74f11ab2ae8 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 11 Nov 2021 16:05:54 +0800
Subject: [PATCH] util.configure: fix one occasionally reproduced configure
@@ -28,15 +28,16 @@ It should be another process that deleted this file by using
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1740667]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
---
build/moz.configure/util.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure
-index 8f35e89c73..84e256647d 100644
+index f5ff3acd79..44f69deceb 100644
--- a/build/moz.configure/util.configure
+++ b/build/moz.configure/util.configure
-@@ -222,7 +222,7 @@ def try_invoke_compiler(compiler, language, source, flags=None, onerror=None):
+@@ -254,7 +254,7 @@ def try_invoke_compiler(
"C++": ".cpp",
}[language]
@@ -45,6 +46,3 @@ index 8f35e89c73..84e256647d 100644
try:
source = source.encode("ascii", "replace")
---
-2.17.1
-
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0002-moz.configure-do-not-look-for-llvm-objdump.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0002-moz.configure-do-not-look-for-llvm-objdump.patch
index 6ff83e3bb2..4c69155a68 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0002-moz.configure-do-not-look-for-llvm-objdump.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/0002-moz.configure-do-not-look-for-llvm-objdump.patch
@@ -1,4 +1,4 @@
-From 0133ddb86eb6e0741e02b0032c41468db6438530 Mon Sep 17 00:00:00 2001
+From 49cb509abd309e3b74ef4c872ae773f18dabca19 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Fri, 1 Oct 2021 13:01:10 +0200
Subject: [PATCH] moz.configure: do not look for llvm-objdump
@@ -8,21 +8,22 @@ for js builds.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+
---
moz.configure | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/moz.configure b/moz.configure
-index fc66b520d0..15de9a2ee0 100755
+index 3a9461200d..33b3f49b0c 100755
--- a/moz.configure
+++ b/moz.configure
-@@ -994,15 +994,15 @@ def llvm_objdump(host_c_compiler, c_compiler, bindgen_config_paths):
- return (llvm_objdump,)
+@@ -723,15 +723,15 @@ check_prog(
+ )
-llvm_objdump = check_prog(
- "LLVM_OBJDUMP",
-- llvm_objdump,
+- llvm_tool("llvm-objdump"),
- what="llvm-objdump",
- when="--enable-compile-environment",
- paths=clang_search_path,
@@ -31,13 +32,13 @@ index fc66b520d0..15de9a2ee0 100755
-add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
+#llvm_objdump = check_prog(
+# "LLVM_OBJDUMP",
-+# llvm_objdump,
++# llvm_tool("llvm-objdump"),
+# what="llvm-objdump",
+# when="--enable-compile-environment",
+# paths=clang_search_path,
+#)
-+
++#
+#add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump)
- option("--enable-dtrace", help="Build with dtrace support")
+ def validate_readelf(path):
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch
index c440bf178f..0f9d062205 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch
@@ -1,21 +1,22 @@
-From 749ba11fd6a69c8180945d4866415d16ae06a9c0 Mon Sep 17 00:00:00 2001
+From ac6a3711917ff3f2b64662cbf4681c22a09da403 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Fri, 1 Oct 2021 13:02:17 +0200
Subject: [PATCH] rust.configure: do not try to find a suitable upstream target
OE is using custom targets and so this is bound to fail.
-Upstream-Status: Inapppropriate [oe-core specific]
+Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+
---
build/moz.configure/rust.configure | 34 ++----------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
-index cd77d72bb7..4b6481cbe3 100644
+index 7a2fd1ae70..e11f13b253 100644
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
-@@ -459,33 +459,7 @@ def assert_rust_compile(host_or_target, rustc_target, rustc):
+@@ -486,33 +486,7 @@ def assert_rust_compile(host_or_target, rustc_target, rustc):
def rust_host_triple(
rustc, host, compiler_info, rustc_host, rust_supported_targets, arm_target
):
@@ -50,7 +51,7 @@ index cd77d72bb7..4b6481cbe3 100644
@depends(
-@@ -495,11 +469,7 @@ def rust_host_triple(
+@@ -522,11 +496,7 @@ def rust_host_triple(
def rust_target_triple(
rustc, target, compiler_info, rust_supported_targets, arm_target
):
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0004-use-asm-sgidefs.h.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/0004-use-asm-sgidefs.h.patch
index b56f0b95b5..6443d46b2c 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0004-use-asm-sgidefs.h.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/0004-use-asm-sgidefs.h.patch
@@ -1,4 +1,4 @@
-From 65acc8800dba7e10da882871d4648241805c47ce Mon Sep 17 00:00:00 2001
+From 607aa4d822b0e074ae1b2fc16d7c140c3e889680 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <amccurdy@gmail.com>
Date: Sat, 30 Apr 2016 15:29:06 -0700
Subject: [PATCH] use <asm/sgidefs.h>
@@ -18,13 +18,16 @@ Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+
---
- gdb/mips-linux-nat.c | 2 +-
+ mfbt/RandomNum.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/mfbt/RandomNum.cpp b/mfbt/RandomNum.cpp
+index 96de5d4055..2cfb2e10ee 100644
--- a/mfbt/RandomNum.cpp
+++ b/mfbt/RandomNum.cpp
-@@ -52,7 +52,7 @@ extern "C" BOOLEAN NTAPI RtlGenRandom(PV
+@@ -53,7 +53,7 @@ extern "C" BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer,
# elif defined(__s390__)
# define GETRANDOM_NR 349
# elif defined(__mips__)
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/armv5.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/armv5.patch
new file mode 100644
index 0000000000..4c45955bca
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/armv5.patch
@@ -0,0 +1,19 @@
+The ISB instruction isn't available in ARMv5 or v6, so
+guard it's use to fix the build on qemuarmv5.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+diff --git a/js/src/jit/arm/Architecture-arm.cpp b/js/src/jit/arm/Architecture-arm.cpp
+--- a/js/src/jit/arm/Architecture-arm.cpp 2024-01-18 17:31:32.078718197 +0000
++++ b/js/src/jit/arm/Architecture-arm.cpp 2024-01-18 18:00:16.738921445 +0000
+@@ -529,7 +529,9 @@
+ void FlushExecutionContext() {
+ #ifndef JS_SIMULATOR_ARM
++#if __ARM_ARCH >= 7
+ // Ensure that any instructions already in the pipeline are discarded and
+ // reloaded from the icache.
+ asm volatile("isb\n" : : : "memory");
++#endif
+ #else
+ // We assume the icache flushing routines on other platforms take care of this
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/fix-musl-build.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/fix-musl-build.patch
new file mode 100644
index 0000000000..22f31e05f8
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/fix-musl-build.patch
@@ -0,0 +1,29 @@
+From e4d8016d0dc56b02e22898d83aad9f80a94d1c3c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 20 Oct 2021 16:21:14 -0700
+Subject: [PATCH] mozjs: Fix musl miscompiles with HAVE_THREAD_TLS_KEYWORD
+
+Upstream: No
+Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD:
+https://github.com/void-linux/void-packages/issues/2598
+
+---
+Upstream-Status: Pending
+
+ js/src/old-configure.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/js/src/old-configure.in b/js/src/old-configure.in
+index cabd72a2b6..0f08d91cbf 100644
+--- a/js/src/old-configure.in
++++ b/js/src/old-configure.in
+@@ -807,6 +807,9 @@ if test "$ac_cv_thread_keyword" = yes; then
+ *-android*|*-linuxandroid*)
+ :
+ ;;
++ *-musl*)
++ :
++ ;;
+ *)
+ AC_DEFINE(HAVE_THREAD_TLS_KEYWORD)
+ ;;
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-115/musl-disable-stackwalk.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/musl-disable-stackwalk.patch
new file mode 100644
index 0000000000..590cddfe5f
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/musl-disable-stackwalk.patch
@@ -0,0 +1,27 @@
+From 9aae71c6ee73431d2609be0ef74ffd4b22b36c75 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 22 Sep 2023 22:59:56 +0000
+Subject: [PATCH] Musl does not have stack unwinder like glibc therefore we can
+ not assume that its always available on musl, we do need to check for target
+ environment as well which could be musl or glibc.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ mozglue/misc/StackWalk.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
+index 307715b170..a8d3cb40c0 100644
+--- a/mozglue/misc/StackWalk.cpp
++++ b/mozglue/misc/StackWalk.cpp
+@@ -43,7 +43,7 @@ using namespace mozilla;
+ # define MOZ_STACKWALK_SUPPORTS_MACOSX 0
+ #endif
+
+-#if (defined(linux) && \
++#if (defined(linux) && defined(__GLIBC__) && \
+ ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
+ defined(HAVE__UNWIND_BACKTRACE)))
+ # define MOZ_STACKWALK_SUPPORTS_LINUX 1
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/riscv32.patch b/meta-oe/recipes-extended/mozjs/mozjs-115/riscv32.patch
index fe9c332a00..16f95659e2 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/riscv32.patch
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115/riscv32.patch
@@ -1,11 +1,22 @@
-Add RISCV32 support
+From d6aff068170e56e6773feba42a463dd8c50bc4ff Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 24 Oct 2021 22:32:50 -0700
+Subject: [PATCH] Add RISCV32 support
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ build/moz.configure/init.configure | 3 +++
+ python/mozbuild/mozbuild/configure/constants.py | 2 ++
+ .../mozbuild/test/configure/test_toolchain_configure.py | 1 +
+ 3 files changed, 6 insertions(+)
+
+diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
+index 53bbc4203f..2ac40d3d39 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
-@@ -765,6 +765,9 @@ def split_triplet(triplet, allow_msvc=Fa
+@@ -584,6 +584,9 @@ def split_triplet(triplet, allow_wasi=False):
elif cpu.startswith("aarch64"):
canonical_cpu = "aarch64"
endianness = "little"
@@ -15,9 +26,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
elif cpu in ("riscv64", "riscv64gc"):
canonical_cpu = "riscv64"
endianness = "little"
+diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
+index a36152651d..a6050be5d8 100644
--- a/python/mozbuild/mozbuild/configure/constants.py
+++ b/python/mozbuild/mozbuild/configure/constants.py
-@@ -52,6 +52,7 @@ CPU_bitness = {
+@@ -51,6 +51,7 @@ CPU_bitness = {
"mips64": 64,
"ppc": 32,
"ppc64": 64,
@@ -25,17 +38,19 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
"riscv64": 64,
"s390": 32,
"s390x": 64,
-@@ -94,6 +95,7 @@ CPU_preprocessor_checks = OrderedDict(
+@@ -98,6 +99,7 @@ CPU_preprocessor_checks = OrderedDict(
("m68k", "__m68k__"),
("mips64", "__mips64"),
("mips32", "__mips__"),
+ ("riscv32", "__riscv && __riscv_xlen == 32"),
("riscv64", "__riscv && __riscv_xlen == 64"),
+ ("loongarch64", "__loongarch64"),
("sh4", "__sh__"),
- ("wasm32", "__wasm32__"),
+diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+index c6af3d99d4..7ef02e1a85 100644
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
-@@ -1186,6 +1186,7 @@ class LinuxCrossCompileToolchainTest(Bas
+@@ -1325,6 +1325,7 @@ class LinuxCrossCompileToolchainTest(BaseToolchainTest):
"m68k-unknown-linux-gnu": big_endian + {"__m68k__": 1},
"mips64-unknown-linux-gnuabi64": big_endian + {"__mips64": 1, "__mips__": 1},
"mips-unknown-linux-gnu": big_endian + {"__mips__": 1},
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91_91.13.0.bb b/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb
index 4c1aa3447a..1269795d20 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-91_91.13.0.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs-115_115.8.0.bb
@@ -11,15 +11,15 @@ SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/fire
file://fix-musl-build.patch \
file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \
file://riscv32.patch \
- file://0005-nojit-32bit-arch-fix.patch \
- file://0006-Fix-build-on-powerpc.patch \
file://0001-util.configure-fix-one-occasionally-reproduced-confi.patch \
file://0001-rewrite-cargo-host-linker-in-python3.patch \
- file://py-3.11.patch \
+ file://musl-disable-stackwalk.patch \
+ file://0001-add-arm-to-list-of-mozinline.patch \
+ file://armv5.patch \
"
-SRC_URI[sha256sum] = "53be2bcde0b5ee3ec106bd8ba06b8ae95e7d489c484e881dfbe5360e4c920762"
+SRC_URI[sha256sum] = "af8086f23efc8492d286671f6035b1a915de6f4ed5c7897e40be0e1cb6b895ea"
-S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}"
+S = "${WORKDIR}/firefox-${PV}"
inherit pkgconfig perlnative python3native rust
@@ -29,7 +29,22 @@ DEPENDS:remove:powerpc:toolchain-clang = "icu"
B = "${WORKDIR}/build"
-export PYTHONPATH = "${S}/build:${S}/third_party/python/PyYAML/lib3:${S}/testing/mozbase/mozfile:${S}/python/mozboot:${S}/third_party/python/distro:${S}/testing/mozbase/mozinfo:${S}/config:${S}/testing/mozbase/manifestparser:${S}/third_party/python/pytoml:${S}/testing/mozbase/mozprocess:${S}/third_party/python/six:${S}/python/mozbuild:${S}/python/mozbuild/mozbuild:${S}/python/mach:${S}/third_party/python/jsmin:${S}/python/mozversioncontrol"
+export PYTHONPATH = "${S}/build:\
+${S}/third_party/python/PyYAML/lib3:\
+${S}/testing/mozbase/mozfile:\
+${S}/python/mozboot:\
+${S}/third_party/python/distro:\
+${S}/testing/mozbase/mozinfo:\
+${S}/config:\
+${S}/testing/mozbase/manifestparser:\
+${S}/third_party/python/pytoml:\
+${S}/testing/mozbase/mozprocess:\
+${S}/third_party/python/six:\
+${S}/python/mozbuild:\
+${S}/python/mozbuild/mozbuild:\
+${S}/python/mach:\
+${S}/third_party/python/jsmin:\
+${S}/python/mozversioncontrol"
export HOST_CC = "${BUILD_CC}"
export HOST_CXX = "${BUILD_CXX}"
@@ -60,6 +75,7 @@ do_configure() {
${JIT} \
${ICU}
}
+do_configure[cleandirs] += "${B}"
do_install() {
oe_runmake 'DESTDIR=${D}' install
@@ -67,14 +83,16 @@ do_install() {
inherit multilib_script multilib_header
-MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js91-config"
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 1)}"
+MULTILIB_SCRIPTS += "${PN}-dev:${bindir}/js${MAJ_VER}-config"
do_install:append() {
- oe_multilib_header mozjs-91/js-config.h
+ oe_multilib_header mozjs-${MAJ_VER}/js-config.h
sed -e 's@${STAGING_DIR_HOST}@@g' \
- -i ${D}${bindir}/js91-config
+ -i ${D}${bindir}/js${MAJ_VER}-config
rm -f ${D}${libdir}/libjs_static.ajs
}
+PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
PACKAGES =+ "lib${BPN}"
FILES:lib${BPN} += "${libdir}/lib*"
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch b/meta-oe/recipes-extended/mozjs/mozjs-91/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
deleted file mode 100644
index a2ccf6b916..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e5b95b3918588e2930c9af7ba304c57e871b2d55 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex@linutronix.de>
-Date: Thu, 7 Oct 2021 12:44:18 +0200
-Subject: [PATCH] build: do not use autoconf's config.sub to 'canonicalize'
- names
-
-The outcome is that processed names no longer match our custom rust
-target definitions, and the build fails.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
----
- build/moz.configure/init.configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
-index 3a164c6558..99dfc9054a 100644
---- a/build/moz.configure/init.configure
-+++ b/build/moz.configure/init.configure
-@@ -823,7 +823,7 @@ def help_host_target(help, host, target):
-
- def config_sub(shell, triplet):
- config_sub = os.path.join(os.path.dirname(__file__), "..", "autoconf", "config.sub")
-- return check_cmd_output(shell, config_sub, triplet).strip()
-+ return triplet
-
-
- @depends("--host", shell)
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0005-nojit-32bit-arch-fix.patch b/meta-oe/recipes-extended/mozjs/mozjs-91/0005-nojit-32bit-arch-fix.patch
deleted file mode 100644
index f308b4863f..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0005-nojit-32bit-arch-fix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix build when JIT is disabled on 32bit systems
-
-This fixes a compile time assert
-js/src/wasm/WasmFrame.cpp:57:3: error: static_assert failed due to requirement '(__builtin_offsetof(js::wasm::DebugFrame, frame_) + sizeof(js::wasm::Frame)) % Alignment == 0' "Aligned after pushing DebugFrame"
- static_assert((offsetof(DebugFrame, frame_) + sizeof(Frame)) % Alignment == 0,
- ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- a/js/src/wasm/WasmFrame.h
-+++ b/js/src/wasm/WasmFrame.h
-@@ -230,6 +230,8 @@ class DebugFrame {
- // Avoid -Wunused-private-field warnings.
- protected:
- #if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_ARM) || \
-+ (defined(JS_CODEGEN_NONE) && \
-+ (defined(__riscv) && __riscv_xlen == 32) || defined(__mips__)) || \
- defined(JS_CODEGEN_X86) || defined(__wasi__)
- // See alignmentStaticAsserts(). For MIPS32, ARM32 and X86 DebugFrame is only
- // 4-byte aligned, so we add another word to get up to 8-byte
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/0006-Fix-build-on-powerpc.patch b/meta-oe/recipes-extended/mozjs/mozjs-91/0006-Fix-build-on-powerpc.patch
deleted file mode 100644
index 80bf746e40..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/0006-Fix-build-on-powerpc.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0e0548e3f95e22a39db8d5b934afe0672a3f801b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
-Date: Mon, 1 Nov 2021 08:13:29 +0100
-Subject: [PATCH] Fix build on powerpc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Another fix for (this time JIT enabled)
-| <...>/irefox-91.2.0/js/src/wasm/WasmFrame.cpp:57:76: error: static assertion failed: Aligned after pushing DebugFrame
-| 57 | static_assert((offsetof(DebugFrame, frame_) + sizeof(Frame)) % Alignment == 0,
-| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
----
- js/src/wasm/WasmFrame.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/js/src/wasm/WasmFrame.h b/js/src/wasm/WasmFrame.h
-index 893762e..2d90656 100644
---- a/js/src/wasm/WasmFrame.h
-+++ b/js/src/wasm/WasmFrame.h
-@@ -232,7 +232,7 @@ class DebugFrame {
- #if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_ARM) || \
- (defined(JS_CODEGEN_NONE) && \
- (defined(__riscv) && __riscv_xlen == 32) || defined(__mips__)) || \
-- defined(JS_CODEGEN_X86) || defined(__wasi__)
-+ defined(JS_CODEGEN_X86) || defined(__wasi__) || defined(__powerpc__)
- // See alignmentStaticAsserts(). For MIPS32, ARM32 and X86 DebugFrame is only
- // 4-byte aligned, so we add another word to get up to 8-byte
- // alignment.
---
-2.31.1
-
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/fix-musl-build.patch b/meta-oe/recipes-extended/mozjs/mozjs-91/fix-musl-build.patch
deleted file mode 100644
index c0834af589..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/fix-musl-build.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream: No
-Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD:
-https://github.com/void-linux/void-packages/issues/2598
---- a/js/src/old-configure.in
-+++ b/js/src/old-configure.in
-@@ -1072,6 +1072,9 @@ if test "$ac_cv_thread_keyword" = yes; t
- *-android*|*-linuxandroid*)
- :
- ;;
-+ *-musl*)
-+ :
-+ ;;
- *)
- AC_DEFINE(HAVE_THREAD_TLS_KEYWORD)
- ;;
diff --git a/meta-oe/recipes-extended/mozjs/mozjs-91/py-3.11.patch b/meta-oe/recipes-extended/mozjs/mozjs-91/py-3.11.patch
deleted file mode 100644
index 71da8225ab..0000000000
--- a/meta-oe/recipes-extended/mozjs/mozjs-91/py-3.11.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-
-# HG changeset patch
-# User ahochheiden <ahochheiden@mozilla.com>
-# Date 1654151264 0
-# Node ID f54162b2c1f2fe52c6137ab2c3469a1944f58b27
-# Parent 6e7776492240c27732840d65a33dcc440fa1aba0
-Bug 1769631 - Remove 'U' from 'mode' parameters for various 'open' calls to ensure Python3.11 compatibility r=firefox-build-system-reviewers,glandium
-
-The 'U' flag represents "universal newline". It has been deprecated
-since Python3.3. Since then "universal newline" is the default when a
-file is opened in text mode (not bytes). In Python3.11 using the 'U'
-flag throws errors. There should be no harm in removing 'U' from 'open'
-everywhere it is used, and doing allows the use of Python3.11.
-
-For more reading see: https://docs.python.org/3.11/whatsnew/3.11.html#changes-in-the-python-api
-
-Differential Revision: https://phabricator.services.mozilla.com/D147721
-
-Upstream-Status: Backport [https://hg.mozilla.org/mozilla-central/rev/f54162b2c1f2fe52c6137ab2c3469a1944f58b27]
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
-
-diff --git a/dom/base/usecounters.py b/dom/base/usecounters.py
---- a/dom/base/usecounters.py
-+++ b/dom/base/usecounters.py
-@@ -3,17 +3,17 @@
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- import collections
- import re
-
-
- def read_conf(conf_filename):
- # Can't read/write from a single StringIO, so make a new one for reading.
-- stream = open(conf_filename, "rU")
-+ stream = open(conf_filename, "r")
-
- def parse_counters(stream):
- for line_num, line in enumerate(stream):
- line = line.rstrip("\n")
- if not line or line.startswith("//"):
- # empty line or comment
- continue
- m = re.match(r"method ([A-Za-z0-9]+)\.([A-Za-z0-9]+)$", line)
-diff --git a/python/mozbuild/mozbuild/action/process_define_files.py b/python/mozbuild/mozbuild/action/process_define_files.py
---- a/python/mozbuild/mozbuild/action/process_define_files.py
-+++ b/python/mozbuild/mozbuild/action/process_define_files.py
-@@ -31,17 +31,17 @@ def process_define_file(output, input):
-
- config = PartialConfigEnvironment(topobjdir)
-
- if mozpath.basedir(
- path, [mozpath.join(topsrcdir, "js/src")]
- ) and not config.substs.get("JS_STANDALONE"):
- config = PartialConfigEnvironment(mozpath.join(topobjdir, "js", "src"))
-
-- with open(path, "rU") as input:
-+ with open(path, "r") as input:
- r = re.compile(
- "^\s*#\s*(?P<cmd>[a-z]+)(?:\s+(?P<name>\S+)(?:\s+(?P<value>\S+))?)?", re.U
- )
- for l in input:
- m = r.match(l)
- if m:
- cmd = m.group("cmd")
- name = m.group("name")
-diff --git a/python/mozbuild/mozbuild/backend/base.py b/python/mozbuild/mozbuild/backend/base.py
---- a/python/mozbuild/mozbuild/backend/base.py
-+++ b/python/mozbuild/mozbuild/backend/base.py
-@@ -267,17 +267,17 @@ class BuildBackend(LoggingMixin):
- If an exception is raised, |mach build| will fail with a
- non-zero exit code.
- """
- self._write_purgecaches(config)
-
- return status
-
- @contextmanager
-- def _write_file(self, path=None, fh=None, readmode="rU"):
-+ def _write_file(self, path=None, fh=None, readmode="r"):
- """Context manager to write a file.
-
- This is a glorified wrapper around FileAvoidWrite with integration to
- update the summary data on this instance.
-
- Example usage:
-
- with self._write_file('foo.txt') as fh:
-diff --git a/python/mozbuild/mozbuild/preprocessor.py b/python/mozbuild/mozbuild/preprocessor.py
---- a/python/mozbuild/mozbuild/preprocessor.py
-+++ b/python/mozbuild/mozbuild/preprocessor.py
-@@ -526,17 +526,17 @@ class Preprocessor:
- if not options.output:
- raise Preprocessor.Error(
- self, "--depend doesn't work with stdout", None
- )
- depfile = get_output_file(options.depend)
-
- if args:
- for f in args:
-- with io.open(f, "rU", encoding="utf-8") as input:
-+ with io.open(f, "r", encoding="utf-8") as input:
- self.processFile(input=input, output=out)
- if depfile:
- mk = Makefile()
- mk.create_rule([six.ensure_text(options.output)]).add_dependencies(
- self.includes
- )
- mk.dump(depfile)
- depfile.close()
-@@ -855,17 +855,17 @@ class Preprocessor:
- self.checkLineNumbers = False
- if isName:
- try:
- args = _to_text(args)
- if filters:
- args = self.applyFilters(args)
- if not os.path.isabs(args):
- args = os.path.join(self.curdir, args)
-- args = io.open(args, "rU", encoding="utf-8")
-+ args = io.open(args, "r", encoding="utf-8")
- except Preprocessor.Error:
- raise
- except Exception:
- raise Preprocessor.Error(self, "FILE_NOT_FOUND", _to_text(args))
- self.checkLineNumbers = bool(
- re.search("\.(js|jsm|java|webidl)(?:\.in)?$", args.name)
- )
- oldFile = self.context["FILE"]
-@@ -909,17 +909,17 @@ class Preprocessor:
-
- def do_error(self, args):
- raise Preprocessor.Error(self, "Error: ", _to_text(args))
-
-
- def preprocess(includes=[sys.stdin], defines={}, output=sys.stdout, marker="#"):
- pp = Preprocessor(defines=defines, marker=marker)
- for f in includes:
-- with io.open(f, "rU", encoding="utf-8") as input:
-+ with io.open(f, "r", encoding="utf-8") as input:
- pp.processFile(input=input, output=output)
- return pp.includes
-
-
- # Keep this module independently executable.
- if __name__ == "__main__":
- pp = Preprocessor()
- pp.handleCommandLine(None, True)
-diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py
---- a/python/mozbuild/mozbuild/util.py
-+++ b/python/mozbuild/mozbuild/util.py
-@@ -231,17 +231,17 @@ class FileAvoidWrite(BytesIO):
- enabled by default because it a) doesn't make sense for binary files b)
- could add unwanted overhead to calls.
-
- Additionally, there is dry run mode where the file is not actually written
- out, but reports whether the file was existing and would have been updated
- still occur, as well as diff capture if requested.
- """
-
-- def __init__(self, filename, capture_diff=False, dry_run=False, readmode="rU"):
-+ def __init__(self, filename, capture_diff=False, dry_run=False, readmode="r"):
- BytesIO.__init__(self)
- self.name = filename
- assert type(capture_diff) == bool
- assert type(dry_run) == bool
- assert "r" in readmode
- self._capture_diff = capture_diff
- self._write_to_file = not dry_run
- self.diff = None
-diff --git a/python/mozbuild/mozpack/files.py b/python/mozbuild/mozpack/files.py
---- a/python/mozbuild/mozpack/files.py
-+++ b/python/mozbuild/mozpack/files.py
-@@ -549,17 +549,17 @@ class PreprocessedFile(BaseFile):
- self.defines = defines
- self.extra_depends = list(extra_depends or [])
- self.silence_missing_directive_warnings = silence_missing_directive_warnings
-
- def inputs(self):
- pp = Preprocessor(defines=self.defines, marker=self.marker)
- pp.setSilenceDirectiveWarnings(self.silence_missing_directive_warnings)
-
-- with _open(self.path, "rU") as input:
-+ with _open(self.path, "r") as input:
- with _open(os.devnull, "w") as output:
- pp.processFile(input=input, output=output)
-
- # This always yields at least self.path.
- return pp.includes
-
- def copy(self, dest, skip_if_older=True):
- """
-@@ -606,17 +606,17 @@ class PreprocessedFile(BaseFile):
- return False
-
- deps_out = None
- if self.depfile:
- deps_out = FileAvoidWrite(self.depfile)
- pp = Preprocessor(defines=self.defines, marker=self.marker)
- pp.setSilenceDirectiveWarnings(self.silence_missing_directive_warnings)
-
-- with _open(self.path, "rU") as input:
-+ with _open(self.path, "r") as input:
- pp.processFile(input=input, output=dest, depfile=deps_out)
-
- dest.close()
- if self.depfile:
- deps_out.close()
-
- return True
-
-