aboutsummaryrefslogtreecommitdiffstats
path: root/main/nodejs/link-with-libatomic-on-mips32.patch
diff options
context:
space:
mode:
authorinfo@mobile-stream.com <info@mobile-stream.com>2018-11-30 10:36:49 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-11-30 13:12:19 +0000
commit21966630200d0258153232ae8c4e07190305449e (patch)
tree61a2745bda5a88fe2767436695c28fb9a38d6036 /main/nodejs/link-with-libatomic-on-mips32.patch
parent3504d219b0e7d01ad37b971a6448399d21b43430 (diff)
downloadaports-21966630200d0258153232ae8c4e07190305449e.tar.bz2
aports-21966630200d0258153232ae8c4e07190305449e.tar.xz
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.
Diffstat (limited to 'main/nodejs/link-with-libatomic-on-mips32.patch')
-rw-r--r--main/nodejs/link-with-libatomic-on-mips32.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/nodejs/link-with-libatomic-on-mips32.patch b/main/nodejs/link-with-libatomic-on-mips32.patch
new file mode 100644
index 0000000000..b8f6a144b7
--- /dev/null
+++ b/main/nodejs/link-with-libatomic-on-mips32.patch
@@ -0,0 +1,22 @@
+--- 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',