Skip to content

Commit

Permalink
two fixes and now actually builds on armv7hf:
Browse files Browse the repository at this point in the history
- mips, ppc and arm platforms want -latomic, so provide it
- link -larm on netbsd/arm to find arm_sync_icache()
  • Loading branch information
mrg committed Oct 17, 2020
1 parent 1df151e commit 8e20b73
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
9 changes: 8 additions & 1 deletion lang/nodejs/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.196 2020/10/08 10:58:35 adam Exp $
# $NetBSD: Makefile,v 1.197 2020/10/17 21:48:41 mrg Exp $

DISTNAME= node-v14.13.1
EXTRACT_SUFX= .tar.xz
Expand All @@ -24,6 +24,13 @@ CXXFLAGS+= -mstackrealign

.include "options.mk"

# Node turns on -latomic for arm, mips and ppc.
.if !empty(MACHINE_ARCH:M*arm*) || \
!empty(MACHINE_ARCH:M*powerpc*) || \
!empty(MACHINE_ARCH:M*mips*)
.include "../../devel/libatomic/buildlink3.mk"
.endif

.include "../../lang/nodejs/Makefile.common"
.include "../../textproc/icu/buildlink3.mk"
# Requires nghttp2_option_set_max_settings
Expand Down
3 changes: 2 additions & 1 deletion lang/nodejs/distinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.184 2020/10/17 07:22:15 mrg Exp $
$NetBSD: distinfo,v 1.185 2020/10/17 21:48:41 mrg Exp $

SHA1 (node-v14.13.1.tar.xz) = 2bed8e2334d0a71a2e430539ae075e519642732e
RMD160 (node-v14.13.1.tar.xz) = 64015436572aed17a85acf2078be7e2e6a746607
Expand All @@ -25,3 +25,4 @@ SHA1 (patch-src_node__postmortem__metadata.cc) = 9938482d724ad6636af5dc3fa719ec2
SHA1 (patch-tools_gyp_pylib_gyp_generator_make.py) = 34d4f113d85b4502bc8240fac50dc37554ab4ebb
SHA1 (patch-tools_gyp_pylib_gyp_xcode__emulation.py) = 4ee24115f5e97ffbd23aaa6dc62f408d381d4e22
SHA1 (patch-tools_install.py) = 8058eb63387971b97a1c3573d1875befeb873e77
SHA1 (patch-tools_v8_gypfiles_v8.gyp) = 49cfd4fa8a8122c6f74965a2e87bbca6d0e44efc
19 changes: 19 additions & 0 deletions lang/nodejs/patches/patch-tools_v8_gypfiles_v8.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$NetBSD: patch-tools_v8_gypfiles_v8.gyp,v 1.1 2020/10/17 21:48:41 mrg Exp $

Add -larm on netbsd arm platforms.

--- tools/v8_gypfiles/v8.gyp.orig 2020-10-07 10:47:43.000000000 -0700
+++ tools/v8_gypfiles/v8.gyp 2020-10-17 13:16:57.485883322 -0700
@@ -903,6 +903,12 @@
}],
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
# to implement atomic memory access
+ # NetBSD/arm also needs -larm.
+ ['OS == "netbsd" and v8_current_cpu in ["arm"]', {
+ 'link_settings': {
+ 'libraries': ['-larm', ],
+ },
+ }],
['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "arm"]', {
'link_settings': {
'libraries': ['-latomic', ],

0 comments on commit 8e20b73

Please sign in to comment.