From 882cd3cf0b662bbdd3c79e0f5ae34bb119c2d4aa Mon Sep 17 00:00:00 2001 From: Marco A L Barbosa Date: Thu, 4 Jan 2018 14:55:04 -0200 Subject: Add i586-unknown-linux-musl target --- .../docker/dist-i586-gnu-i586-i686-musl/Dockerfile | 54 ++++++++++++++++++++++ src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile | 49 -------------------- src/ci/docker/scripts/musl.sh | 2 +- 3 files changed, 55 insertions(+), 50 deletions(-) create mode 100644 src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile delete mode 100644 src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile (limited to 'src/ci/docker') diff --git a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile new file mode 100644 index 00000000000..4c9d4b3ba78 --- /dev/null +++ b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile @@ -0,0 +1,54 @@ +FROM ubuntu:16.04 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + g++-multilib \ + make \ + file \ + curl \ + ca-certificates \ + python2.7 \ + git \ + cmake \ + xz-utils \ + sudo \ + gdb \ + patch \ + libssl-dev \ + pkg-config + +WORKDIR /build/ +COPY scripts/musl.sh /build/ +RUN CC=gcc CFLAGS="-m32 -fPIC -Wa,-mrelax-relocations=no" \ + CXX=g++ CXXFLAGS="-m32 -Wa,-mrelax-relocations=no" \ + bash musl.sh i686 --target=i686 && \ + CC=gcc CFLAGS="-march=pentium -m32 -fPIC -Wa,-mrelax-relocations=no" \ + CXX=g++ CXXFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \ + bash musl.sh i586 --target=i586 && \ + rm -rf /build + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +ENV RUST_CONFIGURE_ARGS \ + --target=i686-unknown-linux-musl,i586-unknown-linux-gnu \ + --musl-root-i586=/musl-i586 \ + --musl-root-i686=/musl-i686 \ + --enable-extended + +# Newer binutils broke things on some vms/distros (i.e., linking against +# unknown relocs disabled by the following flag), so we need to go out of our +# way to produce "super compatible" binaries. +# +# See: https://github.com/rust-lang/rust/issues/34978 +ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no +ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no +# FIXME remove -Wl,-melf_i386 after cc is updated to include +# https://github.com/alexcrichton/cc-rs/pull/281 +ENV CFLAGS_i586_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wl,-melf_i386" + +ENV TARGETS=i586-unknown-linux-gnu +ENV TARGETS=$TARGETS,i686-unknown-linux-musl + +ENV SCRIPT \ + python2.7 ../x.py test --target $TARGETS && \ + python2.7 ../x.py dist --target $TARGETS,i586-unknown-linux-musl diff --git a/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile deleted file mode 100644 index c59476fab00..00000000000 --- a/src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM ubuntu:16.04 - -RUN apt-get update && apt-get install -y --no-install-recommends \ - g++-multilib \ - make \ - file \ - curl \ - ca-certificates \ - python2.7 \ - git \ - cmake \ - xz-utils \ - sudo \ - gdb \ - patch \ - libssl-dev \ - pkg-config - -WORKDIR /build/ -COPY scripts/musl.sh /build/ -RUN CC=gcc CFLAGS="-m32 -fPIC -Wa,-mrelax-relocations=no" \ - CXX=g++ CXXFLAGS="-m32 -Wa,-mrelax-relocations=no" \ - bash musl.sh i686 --target=i686 && \ - rm -rf /build - -COPY scripts/sccache.sh /scripts/ -RUN sh /scripts/sccache.sh - -ENV RUST_CONFIGURE_ARGS \ - --target=i686-unknown-linux-musl,i586-unknown-linux-gnu \ - --musl-root-i686=/musl-i686 \ - --enable-extended - -# Newer binutils broke things on some vms/distros (i.e., linking against -# unknown relocs disabled by the following flag), so we need to go out of our -# way to produce "super compatible" binaries. -# -# See: https://github.com/rust-lang/rust/issues/34978 -ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no -ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no - -ENV SCRIPT \ - python2.7 ../x.py test \ - --target i686-unknown-linux-musl \ - --target i586-unknown-linux-gnu \ - && \ - python2.7 ../x.py dist \ - --target i686-unknown-linux-musl \ - --target i586-unknown-linux-gnu diff --git a/src/ci/docker/scripts/musl.sh b/src/ci/docker/scripts/musl.sh index b704e37d592..e63f1a6f9e5 100644 --- a/src/ci/docker/scripts/musl.sh +++ b/src/ci/docker/scripts/musl.sh @@ -39,7 +39,7 @@ fi cd $MUSL ./configure --disable-shared --prefix=/musl-$TAG $@ -if [ "$TAG" = "i686" ]; then +if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then hide_output make -j$(nproc) AR=ar RANLIB=ranlib else hide_output make -j$(nproc) -- cgit 1.4.1-3-g733a5