| @@ -1,20 +1,27 @@ | | | @@ -1,20 +1,27 @@ |
1 | # $NetBSD: platform.mk,v 1.3 2020/05/19 22:29:05 nia Exp $ | | 1 | # $NetBSD: platform.mk,v 1.4 2020/06/18 15:00:21 gdt Exp $ |
| | | 2 | |
| | | 3 | # This file encodes whether a given platform has support for rust. |
| | | 4 | |
| | | 5 | # Platforms where rust ought to work but does not require a link to an |
| | | 6 | # open PR. |
2 | | | 7 | |
3 | .if !defined(PLATFORM_SUPPORTS_RUST) | | 8 | .if !defined(PLATFORM_SUPPORTS_RUST) |
4 | | | 9 | |
5 | # Rust needs NetBSD>7 | | 10 | # Rust needs NetBSD>7 |
6 | . for _rust_arch in aarch64 armv7 i386 powerpc sparc64 x86_64 | | 11 | . for _rust_arch in aarch64 armv7 i386 powerpc sparc64 x86_64 |
7 | . for _rust_os in Darwin FreeBSD Linux NetBSD SunOS | | 12 | . for _rust_os in Darwin FreeBSD Linux NetBSD SunOS |
| | | 13 | # rust fails to build on NetBSD/earmv7 |
| | | 14 | # http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54621 |
8 | . if ${OPSYS} != "NetBSD" || empty(OS_VERSION:M[0-7].*) | | 15 | . if ${OPSYS} != "NetBSD" || empty(OS_VERSION:M[0-7].*) |
9 | RUST_PLATFORMS+= ${_rust_os}-*-${_rust_arch} | | 16 | RUST_PLATFORMS+= ${_rust_os}-*-${_rust_arch} |
10 | . endif | | 17 | . endif |
11 | . endfor | | 18 | . endfor |
12 | . endfor | | 19 | . endfor |
13 | | | 20 | |
14 | . for _rust_platform in ${RUST_PLATFORMS} | | 21 | . for _rust_platform in ${RUST_PLATFORMS} |
15 | . if !empty(MACHINE_PLATFORM:M${_rust_platform}) | | 22 | . if !empty(MACHINE_PLATFORM:M${_rust_platform}) |
16 | PLATFORM_SUPPORTS_RUST= yes | | 23 | PLATFORM_SUPPORTS_RUST= yes |
17 | . endif | | 24 | . endif |
18 | . endfor | | 25 | . endfor |
19 | PLATFORM_SUPPORTS_RUST?= no | | 26 | PLATFORM_SUPPORTS_RUST?= no |
20 | | | 27 | |