summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/nodejs
diff options
context:
space:
mode:
authorBin Cao <bin.cao.cn@windriver.com>2026-06-03 10:04:29 +0800
committerKhem Raj <khem.raj@oss.qualcomm.com>2026-06-07 18:21:47 -0700
commitb23409aef2bf4fa265c425ce9037b4a7638fafe0 (patch)
tree4469748e917ceaab7391a461d6406c2c1f54cee1 /meta-oe/recipes-devtools/nodejs
parent8aade001c144873283a54d74184617654b5c7a4f (diff)
downloadmeta-openembedded-b23409aef2bf4fa265c425ce9037b4a7638fafe0.tar.gz
nodejs: fix v8 -Wtemplate-body build error with GCC 15 on ia32
GCC 15 introduced -Wtemplate-body (enabled by default as an error) which performs stricter name lookup checking inside template bodies. In the Int64LoweringReducer template class (only compiled for 32-bit targets), the expression `__ Tuple<Word32, Word32>(...)` is ambiguous in a dependent context because GCC cannot determine whether `Tuple` after the `__` macro expansion (`Asm().`) refers to a template member function or the struct type `Tuple`. Add the C++ `template` disambiguator keyword to tell the compiler that `Tuple` is a dependent template name. This is a minimal backport of commit 7772a2df9d0b4db9947dbb902b4aec33c35401c0. Signed-off-by: Bin Cao <bin.cao.cn@windriver.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Diffstat (limited to 'meta-oe/recipes-devtools/nodejs')
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch52
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-24/0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch
new file mode 100644
index 0000000000..4053f97053
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch
@@ -0,0 +1,52 @@
1From 9f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a Mon Sep 17 00:00:00 2001
2From: Bin Cao <bin.cao.cn@windriver.com>
3Date: Thu, 29 May 2026 12:00:00 +0800
4Subject: [PATCH] v8: fix -Wtemplate-body error with GCC 15 on ia32
5
6GCC 15 introduced -Wtemplate-body (enabled by default as an error) which
7performs stricter name lookup checking inside template bodies. In the
8Int64LoweringReducer template class (only compiled for 32-bit targets),
9the expression `__ Tuple<Word32, Word32>(...)` is ambiguous in a
10dependent context because GCC cannot determine whether `Tuple` after
11the `__` macro expansion (`Asm().`) refers to a template member function
12or the struct type `Tuple`.
13
14Add the C++ `template` disambiguator keyword to tell the compiler that
15`Tuple` is a dependent template name. This is the standards-correct fix
16and is backward-compatible with older GCC versions.
17
18This is a minimal backport of the fix already present in upstream V8
19(main branch), where the method was additionally renamed from `Tuple` to
20`MakeTuple`.
21
22Upstream-Status: Backport [https://github.com/nodejs/node/commit/7772a2df9d0b4db9947dbb902b4aec33c35401c0]
23Signed-off-by: Bin Cao <bin.cao.cn@windriver.com>
24---
25 .../turboshaft/int64-lowering-reducer.h | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28diff --git a/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h b/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
29index abcdef1..1234567 100644
30--- a/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
31+++ b/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
32@@ -637,7 +637,7 @@ class Int64LoweringReducer : public Next {
33 result = __ Word32CountLeadingZeros(high);
34 }
35
36- return __ Tuple<Word32, Word32>(result, __ Word32Constant(0));
37+ return __ template Tuple<Word32, Word32>(result, __ Word32Constant(0));
38 }
39
40 V<Word32Pair> LowerCtz(V<Word32Pair> input) {
41@@ -650,7 +650,7 @@ class Int64LoweringReducer : public Next {
42 result = __ Word32CountTrailingZeros(low);
43 }
44
45- return __ Tuple<Word32, Word32>(result, __ Word32Constant(0));
46+ return __ template Tuple<Word32, Word32>(result, __ Word32Constant(0));
47 }
48
49 V<Word32Pair> LowerPopCount(V<Word32Pair> input) {
50--
512.43.0
52
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb
index af12dd3c10..ff40a09656 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb
@@ -29,6 +29,7 @@ SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
29 file://0006-deps-disable-io_uring-support-in-libuv.patch \ 29 file://0006-deps-disable-io_uring-support-in-libuv.patch \
30 file://0007-positional-args.patch \ 30 file://0007-positional-args.patch \
31 file://0008-custom-env.patch \ 31 file://0008-custom-env.patch \
32 file://0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch \
32 file://run-ptest \ 33 file://run-ptest \
33 " 34 "
34SRC_URI:append:class-target = " \ 35SRC_URI:append:class-target = " \