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.
Currently, $arch for aarch64 is set as "armv7l".
https://github.com/hokaccha/nodebrew/blob/master/nodebrew
Since "armv7l" is 32-bit, can we change it to be able to select "arm64" (64-bit) as well?
The armv7l binaries provided by Node.js are 32-bit binary while aarch64 is a 64-bit archtecture.
This is because the original pull-request is made for Chrome OS where the OS is 64-bit but the userland is 32-bit for some efficiency.
Below is the original pull-request to add an aarch64 configuration to the Nodebrew.
PR : https://github.com/hokaccha/nodebrew/pull/69
Merge : https://github.com/hokaccha/nodebrew/commit/5117ab1d8d84e6c8595cc4437084f20614d0dcb6
And it seems that the request came from the following issue of Chromebrew for your reference.
https://github.com/skycocker/chromebrew/issues/2405
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.
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.