]> git.proxmox.com Git - rustc.git/blame - src/vendor/libc/ci/docker/i686-unknown-linux-musl/Dockerfile
New upstream version 1.20.0+dfsg1
[rustc.git] / src / vendor / libc / ci / docker / i686-unknown-linux-musl / Dockerfile
CommitLineData
476ff2be
SL
1FROM ubuntu:16.10
2
8bb4bdeb 3RUN dpkg --add-architecture i386
476ff2be
SL
4RUN apt-get update
5RUN apt-get install -y --no-install-recommends \
8bb4bdeb 6 gcc-multilib make libc6-dev git curl ca-certificates libc6:i386
476ff2be
SL
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'.
15RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
16 tar xzf - && \
17 cd musl-1.1.15 && \
18 CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
19 make CROSS_COMPILE= install -j4 && \
20 cd .. && \
041b39d2
XL
21 rm -rf musl-1.1.15 && \
22# Install linux kernel headers sanitized for use with musl
23 curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
24 tar xzf - && \
25 cd kernel-headers-3.12.6-5 && \
26 make ARCH=i386 prefix=/musl-i686 install -j4 && \
27 cd .. && \
28 rm -rf kernel-headers-3.12.6-5
476ff2be
SL
29ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
30 CC_i686_unknown_linux_musl=musl-gcc