Support NetBSD/aarch64 (#23616)

I could trivially port Nim to NetBSD/aarch64 because it already
supported NetBSD and aarch64. I only needed to generate `c_code` for
this combination.

(cherry picked from commit 0ba932132e)
This commit is contained in:
PHO
2024-05-17 06:22:49 +09:00
committed by narimiran
parent b9951e8c87
commit e57b207ff8
4 changed files with 6 additions and 3 deletions

View File

@@ -128,6 +128,7 @@ type
BSD
FreeBSD
NetBSD
OpenBSD
DragonFlyBSD
@@ -169,7 +170,7 @@ proc detectOsImpl(d: Distribution): bool =
else:
when defined(bsd):
case d
of Distribution.FreeBSD, Distribution.OpenBSD:
of Distribution.FreeBSD, Distribution.NetBSD, Distribution.OpenBSD:
result = $d in uname()
else:
result = false
@@ -252,7 +253,7 @@ proc foreignDepInstallCmd*(foreignPackageName: string): (string, bool) =
result = ("nix-env -i " & p, false)
elif detectOs(Solaris) or detectOs(FreeBSD):
result = ("pkg install " & p, true)
elif detectOs(OpenBSD):
elif detectOs(NetBSD) or detectOs(OpenBSD):
result = ("pkg_add " & p, true)
elif detectOs(PCLinuxOS):
result = ("rpm -ivh " & p, true)