diff options
Diffstat (limited to 'lang')
-rw-r--r-- | lang/rust/platform.mk | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/lang/rust/platform.mk b/lang/rust/platform.mk index b31742555c1..77ced0dbab5 100644 --- a/lang/rust/platform.mk +++ b/lang/rust/platform.mk @@ -1,4 +1,4 @@ -# $NetBSD: platform.mk,v 1.6 2020/12/26 10:04:51 nia Exp $ +# $NetBSD: platform.mk,v 1.7 2021/01/04 11:25:27 nia Exp $ # This file encodes whether a given platform has support for rust. @@ -7,20 +7,36 @@ .if !defined(PLATFORM_SUPPORTS_RUST) -# Rust needs NetBSD>7 -. for rust_arch in aarch64 earmv7hf i386 powerpc sparc64 x86_64 -. for rust_os in Darwin FreeBSD Linux NetBSD SunOS -# rust fails to build on NetBSD/earmv7 -# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54621 -. if ${OPSYS} != "NetBSD" || empty(OS_VERSION:M[0-7].*) -RUST_PLATFORMS+= ${rust_os}-*-${rust_arch} -. endif -. endfor -. endfor +.include "../../mk/bsd.fast.prefs.mk" + +# All Rust bootstraps are built for NetBSD 8.0 at minimum. +. if !empty(MACHINE_PLATFORM:MNetBSD-7.*-*) +PLATFORM_SUPPORTS_RUST?= no +. endif + +# Rust bootstraps are built for NetBSD 9.0 on the following platforms. +. if !empty(MACHINE_PLATFORM:MNetBSD-8.*-*arm*) || \ + !empty(MACHINE_PLATFORM:MNetBSD-8.*-aarch64*) || \ + !empty(MACHINE_PLATFORM:MNetBSD-8.*-sparc64) +PLATFORM_SUPPORTS_RUST?= no +. endif + +RUST_PLATFORMS+= Darwin-*-x86_64 +RUST_PLATFORMS+= FreeBSD-*-i386 +RUST_PLATFORMS+= FreeBSD-*-x86_64 +RUST_PLATFORMS+= Linux-*-i386 +RUST_PLATFORMS+= Linux-*-x86_64 +RUST_PLATFORMS+= NetBSD-*-i386 +RUST_PLATFORMS+= NetBSD-*-x86_64 +RUST_PLATFORMS+= NetBSD-*-powerpc +RUST_PLATFORMS+= NetBSD-*-aarch64 +RUST_PLATFORMS+= NetBSD-*-sparc64 +RUST_PLATFORMS+= NetBSD-*-earmv7hf +RUST_PLATFORMS+= SunOS-*-x86_64 . for rust_platform in ${RUST_PLATFORMS} . if !empty(MACHINE_PLATFORM:M${rust_platform}) -PLATFORM_SUPPORTS_RUST= yes +PLATFORM_SUPPORTS_RUST?= yes . endif . endfor PLATFORM_SUPPORTS_RUST?= no |