diff mbox series

[09/13] package/nodejs: impose dep on ia32 libs/compiler if target arch not 64 bits

Message ID 20220809075704.86472-10-ardeleanalex@gmail.com
State Changes Requested
Headers show
Series package/nodejs: rework cross-building | expand

Commit Message

Alexandru Ardelean Aug. 9, 2022, 7:57 a.m. UTC
This addresses the situation of a host-64 (usually x86_64 host) building for
a 32 bit target.

nodejs cross-compilation also requires (for the JIT stuff) that a 64-bit
target be built with a 64-bit host + target compiler). And likely the same
is true for 32-bit.

Hopefully, we wouldn't have the case of 32-bit hosts building for 64-bit
targets.

But, with this, users require to install the 32-bit libs for
'libicu libc-ares libuv1 libnghttp2 zlib1g' to be able to build the
host-tools during build.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
---
 package/nodejs/Config.in | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
index fad211b750..0b6ded6562 100644
--- a/package/nodejs/Config.in
+++ b/package/nodejs/Config.in
@@ -27,6 +27,8 @@  config BR2_PACKAGE_NODEJS
 	# uses dlopen(). On ARMv5, we could technically support static
 	# linking, but that's too much of a corner case to support it.
 	depends on !BR2_STATIC_LIBS
+	select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS if !BR2_ARCH_IS_64
 	select BR2_PACKAGE_HOST_NODEJS
 	select BR2_PACKAGE_HOST_C_ARES
 	select BR2_PACKAGE_HOST_LIBUV