diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch index d987ac50be..835c7018de 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch @@ -17,6 +17,10 @@ Fix: Upstream-Status: Inappropriate [OE specific] Signed-off-by: Hongxu Jia + +Added libatomic library explicitly to x86 targets. + +Signed-off-by: Gyorgy Sarvari --- node.gyp | 13 ++++++++++++- tools/v8_gypfiles/v8.gyp | 15 ++++++++++++--- @@ -26,7 +30,7 @@ diff --git a/node.gyp b/node.gyp index b425f443..f296f35c 100644 --- a/node.gyp +++ b/node.gyp -@@ -487,7 +487,18 @@ +@@ -503,7 +503,18 @@ ], }], ['OS=="linux" and clang==1', { @@ -50,7 +54,7 @@ diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index b23263cf..dcabf4ca 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp -@@ -1100,9 +1100,18 @@ +@@ -1348,9 +1348,18 @@ # Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library # to implement atomic memory access ['v8_current_cpu in ["mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"]', { @@ -72,6 +76,21 @@ index b23263cf..dcabf4ca 100644 }], ], }, # v8_base_without_compiler --- -2.35.5 - +diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp +index cb82d4f15bc..65cb123b7bf 100644 +--- a/tools/v8_gypfiles/v8.gyp ++++ b/tools/v8_gypfiles/v8.gyp +@@ -1820,6 +1820,13 @@ + ['enable_lto=="true"', { + 'ldflags': [ '-fno-lto' ], + }], ++ # For future patch-rebases: this hunk is in mksnapshot target. ++ # ia32 includes x86 also ++ ['v8_target_arch=="ia32"', { ++ 'link_settings': { ++ 'libraries': ['-latomic'] ++ } ++ }], + ], + }, # mksnapshot + { diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_22.22.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_22.22.0.bb index 1ef01cc3b2..b3a4fb4245 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_22.22.0.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_22.22.0.bb @@ -133,8 +133,6 @@ python do_create_v8_qemu_wrapper () { do_create_v8_qemu_wrapper[dirs] = "${B}" addtask create_v8_qemu_wrapper after do_configure before do_compile -LDFLAGS:append:x86 = " -latomic" - export CC_host export CFLAGS_host export CXX_host