Skip to content

Commit 48193e8

Browse files
committed
Auto merge of #1365 - gnzlbg:cleanup_linux, r=gnzlbg
[breaking change] Cleanup linux and update MUSL * Update MUSL kernel headers to 4.4.2 (non-breaking) * [breaking] `MADV_SOFT_OFFLINE` is not defined on MIPS * [breaking] `sendmmsg`/`recvmmsg` take an `unsigned int` flag on MUSL * [breaking] `pthread_t` is a pointer on MUSL * `rlimit` resources should use a type alias on GNU (non-breaking) * Deprecate `SIGNUNUSED` (should use SIGSYS instead)
2 parents 8e2e498 + 1a3d152 commit 48193e8

File tree

45 files changed

+605
-478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+605
-478
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ matrix:
2222
install: true
2323
script:
2424
- shellcheck --version
25-
- shellcheck ci/*.sh
25+
# FIXME: https://github.com/koalaman/shellcheck/issues/1591
26+
- shellcheck -e SC2103 ci/*.sh
2627
stage: tools-and-build-and-tier1
2728
- name: "Style"
2829
install: true

ci/docker/aarch64-unknown-linux-musl/Dockerfile

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,9 @@ FROM ubuntu:19.04
33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc make libc6-dev git curl ca-certificates \
55
gcc-aarch64-linux-gnu qemu-user
6-
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
7-
tar xzf - && \
8-
cd musl-1.1.22 && \
9-
CC=aarch64-linux-gnu-gcc \
10-
./configure --prefix=/musl-aarch64 --enable-wrapper=yes && \
11-
make install -j4 && \
12-
cd .. && \
13-
rm -rf musl-1.1.22
14-
# Install linux kernel headers sanitized for use with musl
15-
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
16-
tar xzf - && \
17-
cd kernel-headers-3.12.6-6 && \
18-
make ARCH=arm64 prefix=/musl-aarch64 install -j4 && \
19-
cd .. && \
20-
rm -rf kernel-headers-3.12.6-6
6+
7+
COPY install-musl.sh /
8+
RUN sh /install-musl.sh aarch64
219

2210
# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
2311
ENV PATH=$PATH:/musl-aarch64/bin:/rust/bin \

ci/docker/arm-unknown-linux-musleabihf/Dockerfile

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc make libc6-dev git curl ca-certificates \
55
gcc-arm-linux-gnueabihf qemu-user
66

7-
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | tar xzf -
8-
WORKDIR /musl-1.1.22
9-
RUN CC=arm-linux-gnueabihf-gcc \
10-
CFLAGS="-march=armv6 -marm -mfpu=vfp" \
11-
./configure --prefix=/musl-arm --enable-wrapper=yes
12-
RUN make install -j4
13-
14-
# Install linux kernel headers sanitized for use with musl
15-
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
16-
tar xzf - && \
17-
cd kernel-headers-3.12.6-6 && \
18-
make ARCH=arm prefix=/musl-arm install -j4 && \
19-
cd .. && \
20-
rm -rf kernel-headers-3.12.6-6
7+
COPY install-musl.sh /
8+
RUN sh /install-musl.sh arm
219

2210
ENV PATH=$PATH:/musl-arm/bin:/rust/bin \
2311
CC_arm_unknown_linux_musleabihf=musl-gcc \

ci/docker/i686-unknown-linux-musl/Dockerfile

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,9 @@ RUN dpkg --add-architecture i386
44
RUN apt-get update
55
RUN apt-get install -y --no-install-recommends \
66
gcc-multilib make libc6-dev git curl ca-certificates libc6:i386
7-
# Below we're cross-compiling musl for i686 using the system compiler on an
8-
# x86_64 system. This is an awkward thing to be doing and so we have to jump
9-
# through a couple hoops to get musl to be happy. In particular:
10-
#
11-
# * We specifically pass -m32 in CFLAGS and override CC when running ./configure,
12-
# since otherwise the script will fail to find a compiler.
13-
# * We manually unset CROSS_COMPILE when running make; otherwise the makefile
14-
# will call the non-existent binary 'i686-ar'.
15-
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
16-
tar xzf - && \
17-
cd musl-1.1.22 && \
18-
CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
19-
make CROSS_COMPILE= install -j4 && \
20-
cd .. && \
21-
rm -rf musl-1.1.22
22-
# Install linux kernel headers sanitized for use with musl
23-
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
24-
tar xzf - && \
25-
cd kernel-headers-3.12.6-6 && \
26-
make ARCH=i386 prefix=/musl-i686 install -j4 && \
27-
cd .. && \
28-
rm -rf kernel-headers-3.12.6-6
7+
8+
COPY install-musl.sh /
9+
RUN sh /install-musl.sh i686
2910

3011
ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
3112
CC_i686_unknown_linux_musl=musl-gcc

ci/docker/mips-unknown-linux-gnu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu:19.04
33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc libc6-dev qemu-user ca-certificates \
55
gcc-mips-linux-gnu libc6-dev-mips-cross \
6-
qemu-system-mips
6+
qemu-system-mips linux-headers-generic
77

88
ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
99
CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER="qemu-mips -L /usr/mips-linux-gnu" \

ci/docker/mips-unknown-linux-musl/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN mkdir /toolchain
99
# Note that this originally came from:
1010
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
1111
RUN curl --retry 5 -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
12-
tar xjf - -C /toolchain --strip-components=1
12+
tar xjf - -C /toolchain --strip-components=1
1313

1414
ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \
1515
CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \

ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu:19.04
33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc libc6-dev qemu-user ca-certificates \
55
gcc-mips64-linux-gnuabi64 libc6-dev-mips64-cross \
6-
qemu-system-mips64
6+
qemu-system-mips64 linux-headers-generic
77

88
ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \
99
CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64 -L /usr/mips64-linux-gnuabi64" \

ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu:19.04
33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc libc6-dev qemu-user ca-certificates \
55
gcc-mips64el-linux-gnuabi64 libc6-dev-mips64el-cross \
6-
qemu-system-mips64el
6+
qemu-system-mips64el linux-headers-generic
77

88
ENV CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_LINKER=mips64el-linux-gnuabi64-gcc \
99
CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64el -L /usr/mips64el-linux-gnuabi64" \
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
FROM ubuntu:19.04
22
RUN apt-get update
33
RUN apt-get install -y --no-install-recommends \
4-
gcc libc6-dev ca-certificates
4+
gcc libc6-dev ca-certificates linux-headers-generic
5+
6+
RUN apt search linux-headers
7+
RUN ls /usr/src
8+
59
ENV PATH=$PATH:/rust/bin

ci/docker/x86_64-unknown-linux-musl/Dockerfile

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,8 @@ FROM ubuntu:19.04
33
RUN apt-get update
44
RUN apt-get install -y --no-install-recommends \
55
gcc make libc6-dev git curl ca-certificates
6-
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
7-
tar xzf - && \
8-
cd musl-1.1.22 && \
9-
./configure --prefix=/musl-x86_64 && \
10-
make install -j4 && \
11-
cd .. && \
12-
rm -rf musl-1.1.22
13-
# Install linux kernel headers sanitized for use with musl
14-
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
15-
tar xzf - && \
16-
cd kernel-headers-3.12.6-6 && \
17-
make ARCH=x86_64 prefix=/musl-x86_64 install -j4 && \
18-
cd .. && \
19-
rm -rf kernel-headers-3.12.6-6
6+
7+
COPY install-musl.sh /
8+
RUN sh /install-musl.sh x86_64
9+
2010
ENV PATH=$PATH:/musl-x86_64/bin:/rust/bin

0 commit comments

Comments
 (0)