Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #1588 - oxalica:upgrade-musl, r=gnzlbg
Upgrade to musl 1.1.24 in CI Required by #1577 Note that in musl 1.1.24, `struct sched_param` from `sched.h` has changed and some fields became reserved. So [these fields](https://github.com/rust-lang/libc/blob/13d4a5da2eafd82d3ebb2acb729d8b8c9148fb1f/src/unix/linux_like/mod.rs#L97) are outdated. I'm not sure if we should rename them, since they are in public API. I simply skip `struct sched_param` from the test now. Here's the diff between musl 1.1.23 and 1.1.24 ``` diff --git a/include/sched.h b/include/sched.h index 05d40b1e..7e470d3a 100644 --- a/include/sched.h +++ b/include/sched.h @@ -18,10 +18,12 @@ extern "C" { struct sched_param { int sched_priority; - int sched_ss_low_priority; - struct timespec sched_ss_repl_period; - struct timespec sched_ss_init_budget; - int sched_ss_max_repl; + int __reserved1; + struct { + time_t __reserved1; + long __reserved2; + } __reserved2[2]; + int __reserved3; }; ```
- Loading branch information
Showing
5 changed files
with
59 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
FROM ubuntu:19.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \ | ||
bzip2 | ||
gcc libc6-dev qemu-user ca-certificates qemu-system-mipsel curl \ | ||
xz-utils patch | ||
|
||
RUN mkdir /toolchain | ||
|
||
# Note that this originally came from: | ||
# https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | ||
RUN curl --retry 5 -L https://ci-mirrors.rust-lang.org/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \ | ||
tar xjf - -C /toolchain --strip-components=2 | ||
# Linux kernel version: 4.14.151 | ||
# See build_dir/target-mipsel_mips32_musl/linux-brcm47xx_generic/linux-4.14.151 | ||
# Musl version: 1.1.24 | ||
# See staging_dir/toolchain-mipsel_mips32_gcc-7.4.0_musl/info.mk | ||
RUN curl --retry 5 -L https://downloads.openwrt.org/releases/19.07.0-rc1/targets/brcm47xx/generic/openwrt-sdk-19.07.0-rc1-brcm47xx-generic_gcc-7.4.0_musl.Linux-x86_64.tar.xz | \ | ||
tar xJf - -C /toolchain --strip-components=1 | ||
|
||
ENV PATH=$PATH:/rust/bin:/toolchain/bin \ | ||
CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \ | ||
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc \ | ||
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mipsel -L /toolchain" | ||
# See https://lkml.org/lkml/2014/3/14/269 | ||
COPY sysinfo_guard.patch /toolchain | ||
RUN patch /toolchain/staging_dir/toolchain-mipsel_mips32_gcc-7.4.0_musl/include/linux/kernel.h </toolchain/sysinfo_guard.patch | ||
|
||
ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mipsel_mips32_gcc-7.4.0_musl/bin \ | ||
STAGING_DIR=/toolchain/staging_dir \ | ||
CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-musl-gcc \ | ||
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-musl-gcc \ | ||
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mipsel -L /toolchain/staging_dir/toolchain-mipsel_mips32_gcc-7.4.0_musl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@@ -2,7 +2,9 @@ | ||
#ifndef _LINUX_KERNEL_H | ||
#define _LINUX_KERNEL_H | ||
|
||
+#ifdef __GLIBC__ | ||
#include <linux/sysinfo.h> | ||
+#endif | ||
|
||
/* | ||
* 'kernel.h' contains some often-used function prototypes etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters