Repository: node
Issue: Cross Compilation for arm64 on x64 fails
Labels: build

### Version

16.14.2

### Platform

Linux (Fedora 34 64bit)

### Subsystem

_No response_

### What steps will reproduce the bug?

I cross compile Node.js 16.14.2 from sources for 64bit arm on 64bit Intel PC. I use the following options:

```shell
./configure --without-dtrace --without-etw --without-npm --cross-compiling --partly-static --dest-cpu=arm64 --dest-os=linux
```

### How often does it reproduce? Is there a required condition?

_No response_

### What is the expected behavior?

_No response_

### What do you see instead?

 It fails with following:

```console
g++ -o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/mksnapshot -pthread -rdynamic -m64  -Wl,--start-group /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/embedded/embedded-empty.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/embedded/embedded-file-writer.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-win.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/mksnapshot/deps/v8/src/snapshot/snapshot-empty.o /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/tools/v8_gypfiles/libv8_base_without_compiler.a /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/tools/v8_gypfiles/libv8_init.a /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/tools/v8_gypfiles/libv8_libbase.a /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/tools/v8_gypfiles/libv8_libplatform.a /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/tools/v8_gypfiles/libv8_zlib.a /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/tools/v8_gypfiles/libv8_compiler.a /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/tools/v8_gypfiles/libv8_initializers.a -static-libgcc -static-libstdc++ -ldl -lrt -Wl,--end-group
/usr/bin/ld: /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/api/api.o: in function 'v8::TryHandleWebAssemblyTrapPosix(int, siginfo_t*, void*)':
api.cc:(.text._ZN2v829TryHandleWebAssemblyTrapPosixEiP9siginfo_tPv+0x1): undefined reference to 'v8::internal::trap_handler::TryHandleSignal(int, siginfo_t*, void*)'
/usr/bin/ld: /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/api/api.o: in function 'v8::V8::TryHandleSignal(int, void*, void*)':
api.cc:(.text._ZN2v82V815TryHandleSignalEiPvS1_+0x1): undefined reference to 'v8::internal::trap_handler::TryHandleSignal(int, siginfo_t*, void*)'
/usr/bin/ld: /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/trap-handler/handler-outside.o: in function 'v8::internal::trap_handler::EnableTrapHandler(bool)':
handler-outside.cc:(.text._ZN2v88internal12trap_handler17EnableTrapHandlerEb+0x2d): undefined reference to 'v8::internal::trap_handler::RegisterDefaultTrapHandler()'
/usr/bin/ld: /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/execution/arm64/simulator-arm64.o: in function 'v8::internal::Simulator::ProbeMemory(unsigned long, unsigned long)':
simulator-arm64.cc:(.text._ZN2v88internal9Simulator11ProbeMemoryEmm+0x1c): undefined reference to `ProbeMemory'
/usr/bin/ld: /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/execution/arm64/simulator-arm64.o: in function 'v8::internal::Simulator::LoadStoreHelper(v8::internal::Instruction*, long, v8::internal::AddrMode)':
simulator-arm64.cc:(.text._ZN2v88internal9Simulator15LoadStoreHelperEPNS0_11InstructionElNS0_8AddrModeE+0x85): undefined reference to 'ProbeMemory'
/usr/bin/ld: /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/execution/arm64/simulator-arm64.o: in function 'v8::internal::Simulator::NEONLoadStoreSingleStructHelper(v8::internal::Instruction const*, v8::internal::AddrMode)':
simulator-arm64.cc:(.text._ZN2v88internal9Simulator31NEONLoadStoreSingleStructHelperEPKNS0_11InstructionENS0_8AddrModeE+0xde): undefined reference to 'ProbeMemory'
/usr/bin/ld: simulator-arm64.cc:(.text._ZN2v88internal9Simulator31NEONLoadStoreSingleStructHelperEPKNS0_11InstructionENS0_8AddrModeE+0x258): undefined reference to 'ProbeMemory'
/usr/bin/ld: simulator-arm64.cc:(.text._ZN2v88internal9Simulator31NEONLoadStoreSingleStructHelperEPKNS0_11InstructionENS0_8AddrModeE+0x40a): undefined reference to 'ProbeMemory'
/usr/bin/ld: /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/execution/arm64/simulator-arm64.o:simulator-arm64.cc:(.text._ZN2v88internal9Simulator31NEONLoadStoreSingleStructHelperEPKNS0_11InstructionENS0_8AddrModeE+0x83c): more undefined references to 'ProbeMemory' follow
collect2: error: ld returned 1 exit status
make[2]: *** [tools/v8_gypfiles/mksnapshot.host.mk:183: /home/cernockym/Vyvoj/modulesnodered/packages/nodejs/node-v16.14.2/out/Release/mksnapshot] Error1
rm 9f3f2e3c4ad47a90f02b3b7187e9a3474a4663fa.intermediate 7cd555c6c2320e6d4413897b735e5c5c5d6e73a6.intermediate 6bcf538ce384c5de2b15bb794e81c50b7ea812d0.intermediate fc574ff59cc128ac3e7879ba202a247eb6792904.intermediate
make[1]: *** [Makefile:113: node] Error 2
```

### Additional information

_No response_