Hi,
csources_v2/makefile
Run
indicates that the compiler has been ported to NetBSD only under i386/amd64. I
was easily able to build it under arm64:
$ uname -a
NetBSD netbsd 10.99.2 NetBSD 10.99.2 (GENERIC64) #0: Thu Jan 19 05:39:47
GMT 2023
[email protected]:/home/sysbuild/sysbuild/evbarm64/obj/home/sysbuild/src/sys/arch/evbarm/compile/GENERIC64
evbarm
$ uname -p
aarch64
$ uname -m
evbarm
Run
by modifying the above file, copying csources_v3/c_code/6_2 to 6_3 and
replacing 'amd64' in the latter with 'arm64', however, it still reports amd64:
$ nim --version
Nim Compiler Version 1.9.1 [NetBSD: amd64]
Compiled at 2023-01-21
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: f5ec4fbde3d8fb5250e2944d397448219e9053bc
active boot switches: -d:release
Run
Large number of tests appear OK:
$ grep PASS: nim-test-netbsd11.99.2.log |wc -l
1095
$ grep FAIL: nim-test-netbsd11.99.2.log |wc -l
86
Run
To be honest, I am not clear how to submit a pull request for this, it seems to
me rather low-hanging fruit...
I tried also lang/nim from pkgsrc on the same machine, it is at the moment
still at 1.6.8 and does not build, as expected. I tried briefly to look at its
build.sh, but gave up - v2 is more interesting after all...
In case someone wants to try it, I'd suggest an Ampere CPU instance on Oracle
Cloud - you get 4 core/24gb for free, install e.g. Ubuntu, then grab a recent
NetBSD-arm64 live-image and dd it over the disk (it turned NetBSD does not
publish yet arm64 live-images, so it is more complicated, but still possible).