You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can we update the $arch for aarch64 to have capability to choose arm64? #71
Since aarch64 is a 64-bit architecture, it would be nice if we can choose "arm64" along with "armv7l" as well.
Node.js offers arm64 64-bit binaries which are native to aarch64.
$ file node-v11.2.0-linux-arm64/bin/node
node-v11.2.0-linux-arm64/bin/node: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=327b8840de15505d13a9dc1ca8cfa3662ca6eb5b, not stripped
I need this to use Nodebrew on aarch64 systems where the userland is also 64-bit such as Debian 9 on Gemini PDA.
It may be the case for Raspberry Pi 64-bit OS as well.
Here's a patch to resolve it.
It uses ptrsize to check the bitness of the userland binary by picking up the perl itself as a sample.
I have tested it on a Debian 9 aarch64 system.
It downloads and installs the 64-bit binary with no problem.
I have not tested it for Chrome OS since I do not have one.
I hope it works well on the Chrome OS.
diff --git a/nodebrew b/nodebrew
index 9f6da59..0273107 100755
--- a/nodebrew+++ b/nodebrew@@ -733,7 +733,12 @@ sub system_info {
} elsif ($machine =~ m/armv7l/) {
$arch = 'armv7l';
} elsif ($machine =~ m/aarch64/) {
- $arch = 'armv7l';+ use Config;+ if($Config{ptrsize} == 8) {+ $arch = 'arm64';+ } else {+ $arch = 'armv7l';+ }
} elsif ($sysname =~ m/sunos/i) {
# SunOS $machine => 'i86pc'. but use 64bit kernel.
# Solaris 11 not support 32bit kernel.
Activity
Fixes hokaccha#71 - Check for ChromeOS before assigning architecture …