| @@ -1,26 +1,39 @@ | | | @@ -1,26 +1,39 @@ |
1 | # $NetBSD: platform.mk,v 1.21 2024/03/03 14:53:32 he Exp $ | | 1 | # $NetBSD: platform.mk,v 1.22 2024/03/19 11:18:49 nia Exp $ |
2 | | | 2 | |
3 | # This file encodes whether a given platform has support for rust. | | 3 | # This file encodes whether a given platform has support for rust. |
4 | | | 4 | |
5 | # Platforms where rust ought to work but does not require a link to an | | | |
6 | # open PR. | | | |
7 | | | | |
8 | .if !defined(PLATFORM_SUPPORTS_RUST) | | 5 | .if !defined(PLATFORM_SUPPORTS_RUST) |
9 | | | 6 | |
10 | # Rust needs NetBSD>8 | | 7 | .include "../../mk/bsd.fast.prefs.mk" |
11 | .for rust_arch in aarch64 earmv7hf i386 powerpc riscv64 sparc64 x86_64 | | 8 | |
12 | . for rust_os in Darwin FreeBSD Linux NetBSD SunOS | | 9 | .if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} >= 090000 |
13 | . if ${OPSYS} != "NetBSD" || empty(OS_VERSION:M[0-8].*) | | 10 | RUST_PLATFORMS+= NetBSD-*-aarch64 |
14 | RUST_PLATFORMS+= ${rust_os}-*-${rust_arch} | | 11 | RUST_PLATFORMS+= NetBSD-*-aarch64eb |
15 | . endif | | 12 | RUST_PLATFORMS+= NetBSD-*-earmv6hf |
16 | . endfor | | 13 | RUST_PLATFORMS+= NetBSD-*-earmv7hf |
17 | .endfor | | 14 | RUST_PLATFORMS+= NetBSD-*-i386 |
| | | 15 | RUST_PLATFORMS+= NetBSD-*-mipsel |
| | | 16 | RUST_PLATFORMS+= NetBSD-*-powerpc |
| | | 17 | RUST_PLATFORMS+= NetBSD-*-riscv64 |
| | | 18 | RUST_PLATFORMS+= NetBSD-*-sparc64 |
| | | 19 | RUST_PLATFORMS+= NetBSD-*-x86_64 |
| | | 20 | .endif |
| | | 21 | |
| | | 22 | RUST_PLATFORMS+= Darwin-*-aarch64 |
| | | 23 | RUST_PLATFORMS+= Darwin-*-x86_64 |
| | | 24 | RUST_PLATFORMS+= FreeBSD-*-x86_64 |
| | | 25 | RUST_PLATFORMS+= Linux-*-aarch64 |
| | | 26 | RUST_PLATFORMS+= Linux-*-earmv6hf |
| | | 27 | RUST_PLATFORMS+= Linux-*-earmv7hf |
| | | 28 | RUST_PLATFORMS+= Linux-*-i386 |
| | | 29 | RUST_PLATFORMS+= Linux-*-x86_64 |
| | | 30 | RUST_PLATFORMS+= SunOS-*-x86_64 |
18 | | | 31 | |
19 | .for rust_platform in ${RUST_PLATFORMS} | | 32 | .for rust_platform in ${RUST_PLATFORMS} |
20 | . if !empty(MACHINE_PLATFORM:M${rust_platform}) | | 33 | . if !empty(MACHINE_PLATFORM:M${rust_platform}) |
21 | PLATFORM_SUPPORTS_RUST= yes | | 34 | PLATFORM_SUPPORTS_RUST= yes |
22 | . endif | | 35 | . endif |
23 | .endfor | | 36 | .endfor |
24 | PLATFORM_SUPPORTS_RUST?= no | | 37 | PLATFORM_SUPPORTS_RUST?= no |
25 | | | 38 | |
26 | .endif # !defined(PLATFORM_SUPPORTS_RUST) | | 39 | .endif # !defined(PLATFORM_SUPPORTS_RUST) |