Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ci/docker/aarch64-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ FROM ubuntu:17.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
gcc-aarch64-linux-gnu qemu-user
RUN curl https://www.musl-libc.org/releases/musl-1.1.16.tar.gz | \
RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
tar xzf - && \
cd musl-1.1.16 && \
cd musl-1.1.19 && \
CC=aarch64-linux-gnu-gcc \
./configure --prefix=/musl-aarch64 --enable-wrapper=yes && \
make install -j4 && \
cd .. && \
rm -rf musl-1.1.16 && \
rm -rf musl-1.1.19
# Install linux kernel headers sanitized for use with musl
curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
RUN curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
tar xzf - && \
cd kernel-headers-3.12.6-5 && \
cd kernel-headers-3.12.6-6 && \
make ARCH=arm64 prefix=/musl-aarch64 install -j4 && \
cd .. && \
rm -rf kernel-headers-3.12.6-5
rm -rf kernel-headers-3.12.6-6

# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
ENV PATH=$PATH:/musl-aarch64/bin:/rust/bin \
Expand Down
12 changes: 6 additions & 6 deletions ci/docker/arm-unknown-linux-musleabihf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
gcc-arm-linux-gnueabihf qemu-user

RUN curl https://www.musl-libc.org/releases/musl-1.1.16.tar.gz | tar xzf -
WORKDIR /musl-1.1.16
RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | tar xzf -
WORKDIR /musl-1.1.19
RUN CC=arm-linux-gnueabihf-gcc \
CFLAGS="-march=armv6 -marm" \
./configure --prefix=/musl-arm --enable-wrapper=yes
RUN make install -j4

# Install linux kernel headers sanitized for use with musl
RUN \
curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
RUN curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
tar xzf - && \
cd kernel-headers-3.12.6-5 && \
cd kernel-headers-3.12.6-6 && \
make ARCH=arm prefix=/musl-arm install -j4 && \
cd .. && \
rm -rf kernel-headers-3.12.6-5
rm -rf kernel-headers-3.12.6-6

ENV PATH=$PATH:/musl-arm/bin:/rust/bin \
CC_arm_unknown_linux_musleabihf=musl-gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER=musl-gcc \
Expand Down
13 changes: 7 additions & 6 deletions ci/docker/i686-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@ RUN apt-get install -y --no-install-recommends \
# since otherwise the script will fail to find a compiler.
# * We manually unset CROSS_COMPILE when running make; otherwise the makefile
# will call the non-existent binary 'i686-ar'.
RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
tar xzf - && \
cd musl-1.1.15 && \
cd musl-1.1.19 && \
CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
make CROSS_COMPILE= install -j4 && \
cd .. && \
rm -rf musl-1.1.15 && \
rm -rf musl-1.1.19
# Install linux kernel headers sanitized for use with musl
curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
RUN curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
tar xzf - && \
cd kernel-headers-3.12.6-5 && \
cd kernel-headers-3.12.6-6 && \
make ARCH=i386 prefix=/musl-i686 install -j4 && \
cd .. && \
rm -rf kernel-headers-3.12.6-5
rm -rf kernel-headers-3.12.6-6

ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
CC_i686_unknown_linux_musl=musl-gcc
5 changes: 4 additions & 1 deletion ci/docker/sparc64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev \
gcc-sparc64-linux-gnu libc6-dev-sparc64-cross \
qemu-system-sparc64 openbios-sparc seabios ipxe-qemu \
p7zip-full cpio
p7zip-full cpio linux-libc-dev-sparc64-cross linux-headers-4.9.0-3-common

# Put linux/module.h into the right spot as it is not shipped by debian
RUN cp /usr/src/linux-headers-4.9.0-3-common/include/uapi/linux/module.h /usr/sparc64-linux-gnu/include/linux/

COPY linux-sparc64.sh /
RUN bash /linux-sparc64.sh
Expand Down
12 changes: 6 additions & 6 deletions ci/docker/x86_64-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ FROM ubuntu:17.10
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates
RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
tar xzf - && \
cd musl-1.1.15 && \
cd musl-1.1.19 && \
./configure --prefix=/musl-x86_64 && \
make install -j4 && \
cd .. && \
rm -rf musl-1.1.15 && \
rm -rf musl-1.1.19
# Install linux kernel headers sanitized for use with musl
curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
RUN curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
tar xzf - && \
cd kernel-headers-3.12.6-5 && \
cd kernel-headers-3.12.6-6 && \
make ARCH=x86_64 prefix=/musl-x86_64 install -j4 && \
cd .. && \
rm -rf kernel-headers-3.12.6-5
rm -rf kernel-headers-3.12.6-6
ENV PATH=$PATH:/musl-x86_64/bin:/rust/bin
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ fn main() {

if linux || android {
cfg.header("sys/fsuid.h");
cfg.header("linux/module.h");
cfg.header("linux/seccomp.h");
cfg.header("linux/if_ether.h");
cfg.header("linux/if_tun.h");
Expand Down
4 changes: 4 additions & 0 deletions src/unix/notbsd/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,10 @@ pub const SIOCSRARP: ::c_ulong = 0x00008962;
pub const SIOCGIFMAP: ::c_ulong = 0x00008970;
pub const SIOCSIFMAP: ::c_ulong = 0x00008971;

// linux/module.h
pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001;
pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002;

// Similarity to Linux it's not used but defined for compatibility.
pub const ENOATTR: ::c_int = ::ENODATA;

Expand Down
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,10 @@ pub const ARPD_LOOKUP: ::c_ushort = 0x02;
pub const ARPD_FLUSH: ::c_ushort = 0x03;
pub const ATF_MAGIC: ::c_int = 0x80;

// linux/module.h
pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001;
pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002;

f! {
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
for slot in cpuset.bits.iter_mut() {
Expand Down