From 7889f955d80c081abf900622ad50dbadad853ff7 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 19 Jun 2022 11:36:17 +0900 Subject: [PATCH 1/2] Document "Supported target policy" Signed-off-by: Yuki Okushi --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5be6eb9be4a22..3315ed3e84f7e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,6 +72,10 @@ after a certain period. The steps are: If you're using it, please comment on #XXX"). 2. If we don't see any concerns for a while, do the change actually. +## Supported target policy + +When Rust removes a support for a target, the libc crate also may remove the support anytime. + ## Releasing your change to crates.io Now that you've done the amazing job of landing your new API or your new From a0d4f2d78e3b03bf75da8dbf3bdf93465654a39c Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 19 Jun 2022 11:37:41 +0900 Subject: [PATCH 2/2] Remove rumprun-related code Signed-off-by: Yuki Okushi --- ci/README.md | 7 ------- libc-test/build.rs | 21 --------------------- src/unix/bsd/netbsdlike/netbsd/mod.rs | 5 +---- src/unix/mod.rs | 8 -------- 4 files changed, 1 insertion(+), 40 deletions(-) diff --git a/ci/README.md b/ci/README.md index cfe3d53bc842f..c0de4f9edee96 100644 --- a/ci/README.md +++ b/ci/README.md @@ -39,9 +39,6 @@ The remaining architectures look like: then otherwise runs tests normally. * iOS builds need an extra linker flag currently, but beyond that they're built as standard as everything else. -* The rumprun target builds an entire kernel from the test suite and then runs - it inside QEMU using the serial console to test whether it succeeded or - failed. * The BSD builds, currently OpenBSD and FreeBSD, use QEMU to boot up a system and compile/run tests. More information on that below. @@ -62,10 +59,6 @@ however. This strategy is used for all Linux architectures that aren't intel. Note that one downside of this QEMU system is that threads are barely implemented, so we're careful to not spawn many threads. -For the rumprun target the only output is a kernel image, so we just use that -plus the `rumpbake` command to create a full kernel image which is then run from -within QEMU. - Finally, the fun part, the BSDs. Quite a few hoops are jumped through to get CI working for these platforms, but the gist of it looks like: diff --git a/libc-test/build.rs b/libc-test/build.rs index a3f940a3e823e..26f746b01f154 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -969,7 +969,6 @@ fn test_solarish(target: &str) { fn test_netbsd(target: &str) { assert!(target.contains("netbsd")); - let rumprun = target.contains("rumprun"); let mut cfg = ctest_cfg(); cfg.flag("-Wno-deprecated-declarations"); @@ -1146,26 +1145,6 @@ fn test_netbsd(target: &str) { "setrlimit" | "setrlimit64" | // non-int in 1st arg "prlimit" | "prlimit64" | // non-int in 2nd arg - // These functions presumably exist on netbsd but don't look like - // they're implemented on rumprun yet, just let them slide for now. - // Some of them look like they have headers but then don't have - // corresponding actual definitions either... - "shm_open" | - "shm_unlink" | - "syscall" | - "mq_open" | - "mq_close" | - "mq_getattr" | - "mq_notify" | - "mq_receive" | - "mq_send" | - "mq_setattr" | - "mq_timedreceive" | - "mq_timedsend" | - "mq_unlink" | - "ptrace" | - "sigaltstack" if rumprun => true, - _ => false, } }); diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index f325bd46581b1..07a7412ac66b7 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -1568,10 +1568,7 @@ pub const IPPROTO_VRRP: ::c_int = 112; /// Common Address Resolution Protocol pub const IPPROTO_CARP: ::c_int = 112; /// L2TPv3 -// TEMP: Disabled for now; this constant was added to NetBSD on 2017-02-16, -// but isn't yet supported by the NetBSD rumprun kernel image used for -// libc testing. -//pub const IPPROTO_L2TP: ::c_int = 115; +pub const IPPROTO_L2TP: ::c_int = 115; /// SCTP pub const IPPROTO_SCTP: ::c_int = 132; /// PFSYNC diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 2d72497a11ddf..1d57f28b2112d 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -346,14 +346,6 @@ cfg_if! { } else if #[cfg(target_os = "emscripten")] { #[link(name = "c")] extern {} - } else if #[cfg(all(target_os = "netbsd", - feature = "rustc-dep-of-std", - target_vendor = "rumprun"))] { - // Since we don't use -nodefaultlibs on Rumprun, libc is always pulled - // in automatically by the linker. We avoid passing it explicitly, as it - // causes some versions of binutils to crash with an assertion failure. - #[link(name = "m")] - extern {} } else if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos",