aports/main/nodejs/link-with-libatomic-on-mips32.patch
info@mobile-stream.com 2196663020 main/nodejs: fix build on mips{el} (-latomic), disable on mips64*
1) Add the usual -latomic for pre-R6 MIPS32.

2) Alpine mips64* definitions assume MIPS III but nodejs wants MIPS32 at least and can
actually generate instructions missing in MIPS III, e.g. movn/movz. There is also some
support for Loongson 2 (which is a MIPS III CPU) however it apparently always targets
hard-float O32 ABI so be safe and disable build on mips64* completely.

Keep pkgrel intact since no previously built mips* apks exist and changes are strictly
mips-specific.
2018-11-30 13:12:19 +00:00

23 lines
745 B
Diff

--- a/node.gyp
+++ b/node.gyp
@@ -247,6 +247,9 @@
'msvs_disabled_warnings!': [4244],
'conditions': [
+ [ '(target_arch=="mips" or target_arch=="mipsel") and mips_arch_variant!="r6"', {
+ 'libraries': [ '-latomic' ],
+ }],
[ 'node_intermediate_lib_type=="static_library" and '
'node_shared=="true" and OS=="aix"', {
# For AIX, shared lib is linked by static lib and .exp. In the
@@ -934,6 +937,9 @@
],
'conditions': [
+ [ '(target_arch=="mips" or target_arch=="mipsel") and mips_arch_variant!="r6"', {
+ 'libraries': [ '-latomic' ],
+ }],
[ 'node_use_openssl=="true"', {
'defines': [
'HAVE_OPENSSL=1',