aboutsummaryrefslogtreecommitdiff
path: root/libc/ci/docker/i686-unknown-linux-musl
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2017-03-26 17:07:34 -0700
committerDaniel Mueller <deso@posteo.net>2017-03-26 17:07:34 -0700
commitcb39828ecd7ea5d2eac3076ad3dd1b6ef05e10d3 (patch)
treeee9b7fb3e686a2154a95487e404b605d141b9258 /libc/ci/docker/i686-unknown-linux-musl
parent86415f23a86b5a44aa000d513500a9d1d0df4bba (diff)
downloadnitrocli-cb39828ecd7ea5d2eac3076ad3dd1b6ef05e10d3.tar.gz
nitrocli-cb39828ecd7ea5d2eac3076ad3dd1b6ef05e10d3.tar.bz2
Import subrepo libc/:libc at 05a2d197356ef253dfd985166576619ac9b6947f
Diffstat (limited to 'libc/ci/docker/i686-unknown-linux-musl')
-rw-r--r--libc/ci/docker/i686-unknown-linux-musl/Dockerfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/libc/ci/docker/i686-unknown-linux-musl/Dockerfile b/libc/ci/docker/i686-unknown-linux-musl/Dockerfile
new file mode 100644
index 0000000..bdc2272
--- /dev/null
+++ b/libc/ci/docker/i686-unknown-linux-musl/Dockerfile
@@ -0,0 +1,23 @@
+FROM ubuntu:16.10
+
+RUN dpkg --add-architecture i386
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+ gcc-multilib make libc6-dev git curl ca-certificates libc6:i386
+# Below we're cross-compiling musl for i686 using the system compiler on an
+# x86_64 system. This is an awkward thing to be doing and so we have to jump
+# through a couple hoops to get musl to be happy. In particular:
+#
+# * We specifically pass -m32 in CFLAGS and override CC when running ./configure,
+# 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 | \
+ tar xzf - && \
+ cd musl-1.1.15 && \
+ CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
+ make CROSS_COMPILE= install -j4 && \
+ cd .. && \
+ rm -rf musl-1.1.15
+ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
+ CC_i686_unknown_linux_musl=musl-gcc