mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 14:01:57 -09:00
package/nodejs: fix 'Duplicate v8 target errors when cross-compiling' error
Reported also via:
https://github.com/nodejs/node/issues/37441
Patched in:
5e533cb943
The error is:
```
ninja: Entering directory `out/Release'
ninja: error: obj.host/tools/v8_gypfiles/run_torque.ninja:1356: multiple rules generate gen/torque-generated/bit-fields.h [-w dupbuild=err]
make[2]: *** [Makefile:127: node] Error 1
make[1]: *** [package/pkg-generic.mk:293: <buildroot>/output/build/nodejs-16.15.0/.stamp_built] Error 2
make: *** [Makefile:84: _all] Error 2
```
Fixes:
http://autobuild.buildroot.net/results/7fe9132236ee8e3a86dd97fe96ffee42990c2d19/
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
[Thomas:
- regenerate patch as a git formatted patch, add a link to the
original location, add my own SoB to it
- improve commit log]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
f85e2cfc6e
commit
5708c5b04f
@@ -0,0 +1,42 @@
|
|||||||
|
From e6e691d093de440e0f408d48971e2b7332a07d58 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Min RK <benjaminrk@gmail.com>
|
||||||
|
Date: Fri, 19 Feb 2021 11:57:04 +0100
|
||||||
|
Subject: [PATCH] include obj name in shared intermediate
|
||||||
|
|
||||||
|
avoids duplicate ninja rules for v8 used in host and target
|
||||||
|
|
||||||
|
From: https://github.com/minrk/node/commit/5e533cb943eef68b270f55f0cba02c0ec67c699d
|
||||||
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||||
|
---
|
||||||
|
tools/gyp/pylib/gyp/generator/ninja.py | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/gyp/pylib/gyp/generator/ninja.py b/tools/gyp/pylib/gyp/generator/ninja.py
|
||||||
|
index d173bf2299..efaeee53ef 100644
|
||||||
|
--- a/tools/gyp/pylib/gyp/generator/ninja.py
|
||||||
|
+++ b/tools/gyp/pylib/gyp/generator/ninja.py
|
||||||
|
@@ -42,7 +42,7 @@ generator_default_variables = {
|
||||||
|
# the start of a string, while $| is used for variables that can appear
|
||||||
|
# anywhere in a string.
|
||||||
|
"INTERMEDIATE_DIR": "$!INTERMEDIATE_DIR",
|
||||||
|
- "SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/gen",
|
||||||
|
+ "SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/$|OBJ/gen",
|
||||||
|
"PRODUCT_DIR": "$!PRODUCT_DIR",
|
||||||
|
"CONFIGURATION_NAME": "$|CONFIGURATION_NAME",
|
||||||
|
# Special variables that may be used by gyp 'rule' targets.
|
||||||
|
@@ -285,6 +285,12 @@ class NinjaWriter:
|
||||||
|
CONFIGURATION_NAME = "$|CONFIGURATION_NAME"
|
||||||
|
path = path.replace(CONFIGURATION_NAME, self.config_name)
|
||||||
|
|
||||||
|
+ obj = "obj"
|
||||||
|
+ if self.toolset != "target":
|
||||||
|
+ obj += "." + self.toolset
|
||||||
|
+
|
||||||
|
+ path = path.replace("$|OBJ", obj)
|
||||||
|
+
|
||||||
|
return path
|
||||||
|
|
||||||
|
def ExpandRuleVariables(self, path, root, dirname, source, ext, name):
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
||||||
Reference in New Issue
Block a user