From d2c9877d7241f13d5bf244009c97890fba375c50 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Oct 2020 10:42:33 +0900 Subject: [PATCH 1/5] Add `x86_64-unknown-redox` Dockerfile --- ci/docker/x86_64-unknown-redox/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ci/docker/x86_64-unknown-redox/Dockerfile diff --git a/ci/docker/x86_64-unknown-redox/Dockerfile b/ci/docker/x86_64-unknown-redox/Dockerfile new file mode 100644 index 0000000000000..91b0cbabdc0b6 --- /dev/null +++ b/ci/docker/x86_64-unknown-redox/Dockerfile @@ -0,0 +1,9 @@ +FROM redoxos/redoxer + +RUN mv /root/.redoxer /.redoxer + +ENV PATH=$PATH:/.redoxer/toolchain/bin:/rust/bin \ + AR_x86_64_unknown_redox="x86_64-unknown-redox-ar" \ + CC_x86_64_unknown_redox="x86_64-unknown-redox-gcc" \ + CARGO_TARGET_X86_64_UNKNOWN_REDOX_LINKER="x86_64-unknown-redox-gcc" \ + CARGO_TARGET_X86_64_UNKNOWN_REDOX_RUNNER="redoxer exec --folder ." From ec0eec26c566922a2cc1a2806bf1ac648d8c693a Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Oct 2020 11:05:21 +0900 Subject: [PATCH 2/5] Remove some header files from `test_redox` --- libc-test/build.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index b9120809b8ae3..913932cfc9961 100755 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -537,43 +537,28 @@ fn test_redox(target: &str) { "dirent.h", "dlfcn.h", "errno.h", - "execinfo.h", "fcntl.h", - "glob.h", "grp.h", - "ifaddrs.h", - "langinfo.h", "limits.h", "locale.h", - "net/if.h", - "net/if_arp.h", - "net/route.h", "netdb.h", "netinet/in.h", "netinet/ip.h", "netinet/tcp.h", - "netinet/udp.h", "poll.h", - "pthread.h", "pwd.h", - "resolv.h", - "sched.h", "semaphore.h", "string.h", "strings.h", "sys/file.h", "sys/ioctl.h", "sys/mman.h", - "sys/mount.h", "sys/ptrace.h", - "sys/quota.h", "sys/resource.h", "sys/socket.h", "sys/stat.h", "sys/statvfs.h", - "sys/sysctl.h", "sys/time.h", - "sys/times.h", "sys/types.h", "sys/uio.h", "sys/un.h", @@ -584,7 +569,6 @@ fn test_redox(target: &str) { "time.h", "unistd.h", "utime.h", - "utmpx.h", "wchar.h", } From f0a1bdf06c6080bf8a01d2a423aa824d91cdaf3d Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Oct 2020 11:48:20 +0900 Subject: [PATCH 3/5] Exclude redox from cmsg test --- libc-test/build.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 913932cfc9961..a696a1b58b560 100755 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -8,7 +8,7 @@ use std::env; fn do_cc() { let target = env::var("TARGET").unwrap(); if cfg!(unix) { - let exclude = ["wasi"]; + let exclude = ["redox", "wasi"]; if !exclude.iter().any(|x| target.contains(x)) { let mut cmsg = cc::Build::new(); @@ -564,7 +564,6 @@ fn test_redox(target: &str) { "sys/un.h", "sys/utsname.h", "sys/wait.h", - "syslog.h", "termios.h", "time.h", "unistd.h", From c2d015eb248bae91ff0c7a47b2caa0dd1dea82a8 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Oct 2020 12:45:45 +0900 Subject: [PATCH 4/5] Add FIXME comment for redox --- .github/workflows/bors.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/bors.yml b/.github/workflows/bors.yml index ffbef975afca8..2201899e479a9 100644 --- a/.github/workflows/bors.yml +++ b/.github/workflows/bors.yml @@ -132,6 +132,9 @@ jobs: x86_64-linux-android, x86_64-unknown-linux-gnux32, x86_64-unknown-linux-musl, + # FIXME: It seems some items in `src/unix/mod.rs` + # aren't defined on redox actually. + # x86_64-unknown-redox, ] steps: - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master From 6f1b951db57836ca3fc4625585064b7dde2c7531 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Oct 2020 12:49:46 +0900 Subject: [PATCH 5/5] Run build test for `x86_64-unknown-redox` --- ci/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 9decfb75cfb5d..ba186f3af5586 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -137,9 +137,6 @@ RUST_GT_1_24_LINUX_TARGETS="\ i586-unknown-linux-musl \ " -# FIXME: temporarirly disable the redox target -# https://github.com/rust-lang/libc/issues/1457 -# x86_64-unknown-redox RUST_NIGHTLY_LINUX_TARGETS="\ aarch64-fuchsia \ armv5te-unknown-linux-gnueabi \ @@ -151,6 +148,7 @@ x86_64-fortanix-unknown-sgx \ x86_64-fuchsia \ x86_64-pc-windows-gnu \ x86_64-unknown-linux-gnux32 \ +x86_64-unknown-redox \ " RUST_OSX_TARGETS="\