Commit Graph

7 Commits

Author SHA1 Message Date
Khem Raj d4c2a95d4f nodejs: Fix build on arm64 hosts
When clang is used as cross compiler, it confuses gyp
system to enable -m64 option for host pieces of build
and the reason is that it assumes clang to be biarch
by default for all architectures but that maybe true for
x86/x86_64 combo but not true for arm/aarch64 systems

This is a backport from node 24

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-07-20 21:21:32 -07:00
Alexander Kanavin 040ba69712 Revert "nodejs: inherit qemu class conditionally"
Plenty of other recipes inherit qemu unconditionally, including
some pretty foundational ones like python3, and they do not need
this fix. I think something else is going on here, and that issue
needs to be properly investigated.

There's a request to provide steps to observe the issue, but the original
patch author so far hasn't been able to reproduce it on demand:
https://lists.openembedded.org/g/openembedded-devel/topic/113861973

This reverts commit b2a950a75b.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-07-01 08:11:11 -07:00
Gyorgy Sarvari b2a950a75b nodejs: inherit qemu class conditionally
The recipe unconditionally inherits the qemu class, because it executes
some target binaries when it is cross-compiled and the bit-width of the
build host and the target host are different.

Since it is unconditional, it also means that it is inherited for native
and nativesdk builds also. The qemu class uses some qemu options that are
always derived from the target machine's configuration, even when the
recipe is built for class-native. This means that some of the variables
used by the recipe changes (e.g. QEMU_OPTIONS), and the shared state cache
is invalidated when the target machine changes, even when nodejs-native is
being built - and it triggers a full rebuild of nodejs-native unnecessarily.

To avoid this, inherit the qemu class conditionally, only in case it is
used (when the target and build arch's bit-widths are different).

Also, inherit qemu-native based on the same condition, and move around the
qemu-dependent code a bit, so it will be only executed when the qemu class
is inherited.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-06-28 11:04:24 -07:00
Alexander Kanavin fc78d37ff0 meta-openembedded/all: adapt to UNPACKDIR changes
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.

I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-06-25 06:44:52 -07:00
Hongxu Jia 53b786da3a nodejs: Disable for powerpc64le
Fixes:
1. Compile failure with host gcc 11.4.0 (on ubuntu 22.04)
$ echo 'MACHINE = "qemuppc64"' >> conf/local.conf
$ bitbake nodejs
'''
../deps/v8/src/execution/ppc/simulator-ppc.cc:5126:33: error: ‘ceilf’ is not a member of ‘std’; did you mean ‘ceil’?
 5126 |       VECTOR_FP_ROUNDING(float, ceilf)
      |                                 ^~~~~
'''

2. Segment fault on qemuppc64
$ runqemu qemuppc64 slirp nographic ext4 snapshot qemuparams="-m 8192"
root@qemuppc64:~# node --help
Segmentation fault (core dumped)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-06-25 06:44:49 -07:00
Chen Qi acacb59a48 Revert "recipes: adapt to qemu.bbclass refactoring"
This reverts commit 24ff52ba3b.

The original patch was my bad. The patches for oe-core were re-worked,
but I forgot the recall this patch.

In fact, inheriting qemu is needed because it sets a clear barriar
for people to use qemu user mode. And the QEMU_OPTIONS settings
are also in qemu.bbclass.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-05-29 22:28:02 -07:00
Jason Schonberg 58ba5cbab3 nodejs: upgrade 22.15.1 -> 22.16.0
Drop the backported zlib-fix-pointer-alignment patch.  It is included in this release.
  https://github.com/nodejs/node/commit/f2159f2a44

Changelog: https://github.com/nodejs/node/releases/tag/v22.16.0

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-05-22 17:39:09 -07:00