diff options
Diffstat (limited to 'src/ci/docker/dist-i686-linux')
| -rw-r--r-- | src/ci/docker/dist-i686-linux/Dockerfile | 49 | ||||
| -rwxr-xr-x | src/ci/docker/dist-i686-linux/build-binutils.sh | 26 | ||||
| -rwxr-xr-x | src/ci/docker/dist-i686-linux/build-cmake.sh | 25 | ||||
| -rwxr-xr-x | src/ci/docker/dist-i686-linux/build-curl.sh | 43 | ||||
| -rwxr-xr-x | src/ci/docker/dist-i686-linux/build-gcc.sh | 50 | ||||
| -rwxr-xr-x | src/ci/docker/dist-i686-linux/build-git.sh | 24 | ||||
| -rwxr-xr-x | src/ci/docker/dist-i686-linux/build-headers.sh | 25 | ||||
| -rwxr-xr-x | src/ci/docker/dist-i686-linux/build-openssl.sh | 28 | ||||
| -rwxr-xr-x | src/ci/docker/dist-i686-linux/build-python.sh | 30 | ||||
| -rw-r--r-- | src/ci/docker/dist-i686-linux/shared.sh | 25 |
10 files changed, 33 insertions, 292 deletions
diff --git a/src/ci/docker/dist-i686-linux/Dockerfile b/src/ci/docker/dist-i686-linux/Dockerfile index 0ec57ee0886..d591fb28f36 100644 --- a/src/ci/docker/dist-i686-linux/Dockerfile +++ b/src/ci/docker/dist-i686-linux/Dockerfile @@ -29,13 +29,13 @@ ENV PATH=/rustroot/bin:$PATH ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp -COPY dist-i686-linux/shared.sh dist-i686-linux/build-binutils.sh /tmp/ +COPY dist-x86_64-linux/shared.sh /tmp/ # We need a build of openssl which supports SNI to download artifacts from # static.rust-lang.org. This'll be used to link into libcurl below (and used # later as well), so build a copy of OpenSSL with dynamic libraries into our # generic root. -COPY dist-i686-linux/build-openssl.sh /tmp/ +COPY dist-x86_64-linux/build-openssl.sh /tmp/ RUN ./build-openssl.sh # The `curl` binary on CentOS doesn't support SNI which is needed for fetching @@ -44,36 +44,43 @@ RUN ./build-openssl.sh # # Note that we also disable a bunch of optional features of curl that we don't # really need. -COPY dist-i686-linux/build-curl.sh /tmp/ +COPY dist-x86_64-linux/build-curl.sh /tmp/ RUN ./build-curl.sh # binutils < 2.22 has a bug where the 32-bit executables it generates # immediately segfault in Rust, so we need to install our own binutils. # # See https://github.com/rust-lang/rust/issues/20440 for more info +COPY dist-x86_64-linux/build-binutils.sh /tmp/ RUN ./build-binutils.sh +# libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS +# only has 2.6.4, so build our own +COPY dist-x86_64-linux/build-cmake.sh /tmp/ +RUN ./build-cmake.sh + # Need a newer version of gcc than centos has to compile LLVM nowadays -COPY dist-i686-linux/build-gcc.sh /tmp/ +COPY dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh # CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+ -COPY dist-i686-linux/build-python.sh /tmp/ +COPY dist-x86_64-linux/build-python.sh /tmp/ RUN ./build-python.sh +# Now build LLVM+Clang 6, afterwards configuring further compilations to use the +# clang/clang++ compilers. +COPY dist-x86_64-linux/build-clang.sh /tmp/ +RUN ./build-clang.sh +ENV CC=clang CXX=clang++ + # Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for # cloning, so download and build it here. -COPY dist-i686-linux/build-git.sh /tmp/ +COPY dist-x86_64-linux/build-git.sh /tmp/ RUN ./build-git.sh -# libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS -# only has 2.6.4, so build our own -COPY dist-i686-linux/build-cmake.sh /tmp/ -RUN ./build-cmake.sh - # for sanitizers, we need kernel headers files newer than the ones CentOS ships # with so we install newer ones here -COPY dist-i686-linux/build-headers.sh /tmp/ +COPY dist-x86_64-linux/build-headers.sh /tmp/ RUN ./build-headers.sh COPY scripts/sccache.sh /scripts/ @@ -84,11 +91,21 @@ ENV HOSTS=i686-unknown-linux-gnu ENV RUST_CONFIGURE_ARGS \ --enable-full-tools \ --enable-sanitizers \ - --enable-profiler + --enable-profiler \ + --set target.i686-unknown-linux-gnu.linker=clang \ + --build=i686-unknown-linux-gnu ENV SCRIPT python2.7 ../x.py dist --build $HOSTS --host $HOSTS --target $HOSTS - -# This is the only builder which will create source tarballs -ENV DIST_SRC 1 +ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER=clang + +# This was added when we switched from gcc to clang. It's not clear why this is +# needed unfortunately, but without this the stage1 bootstrap segfaults +# somewhere inside of a build script. The build ends up just hanging instead of +# actually killing the process that segfaulted, but if the process is run +# manually in a debugger the segfault is immediately seen as well as the +# misaligned stack access. +# +# Added in #50200 there's some more logs there +ENV CFLAGS -mstackrealign # When we build cargo in this container, we don't want it to use the system # libcurl, instead it should compile its own. diff --git a/src/ci/docker/dist-i686-linux/build-binutils.sh b/src/ci/docker/dist-i686-linux/build-binutils.sh deleted file mode 100755 index f4bdbd80d0e..00000000000 --- a/src/ci/docker/dist-i686-linux/build-binutils.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex - -source shared.sh - -curl https://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2 | tar xfj - - -mkdir binutils-build -cd binutils-build -hide_output ../binutils-2.25.1/configure --prefix=/rustroot -hide_output make -j10 -hide_output make install - -cd .. -rm -rf binutils-build -rm -rf binutils-2.25.1 diff --git a/src/ci/docker/dist-i686-linux/build-cmake.sh b/src/ci/docker/dist-i686-linux/build-cmake.sh deleted file mode 100755 index 9a3763d421a..00000000000 --- a/src/ci/docker/dist-i686-linux/build-cmake.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex -source shared.sh - -curl https://cmake.org/files/v3.6/cmake-3.6.3.tar.gz | tar xzf - - -mkdir cmake-build -cd cmake-build -hide_output ../cmake-3.6.3/configure --prefix=/rustroot -hide_output make -j10 -hide_output make install - -cd .. -rm -rf cmake-build -rm -rf cmake-3.6.3 diff --git a/src/ci/docker/dist-i686-linux/build-curl.sh b/src/ci/docker/dist-i686-linux/build-curl.sh deleted file mode 100755 index edf3175b81c..00000000000 --- a/src/ci/docker/dist-i686-linux/build-curl.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex -source shared.sh - -VERSION=7.51.0 - -curl http://cool.haxx.se/download/curl-$VERSION.tar.bz2 | tar xjf - - -mkdir curl-build -cd curl-build -hide_output ../curl-$VERSION/configure \ - --prefix=/rustroot \ - --with-ssl=/rustroot \ - --disable-sspi \ - --disable-gopher \ - --disable-smtp \ - --disable-smb \ - --disable-imap \ - --disable-pop3 \ - --disable-tftp \ - --disable-telnet \ - --disable-manual \ - --disable-dict \ - --disable-rtsp \ - --disable-ldaps \ - --disable-ldap -hide_output make -j10 -hide_output make install - -cd .. -rm -rf curl-build -rm -rf curl-$VERSION -yum erase -y curl diff --git a/src/ci/docker/dist-i686-linux/build-gcc.sh b/src/ci/docker/dist-i686-linux/build-gcc.sh deleted file mode 100755 index 08020e533ff..00000000000 --- a/src/ci/docker/dist-i686-linux/build-gcc.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex - -source shared.sh - -GCC=4.8.5 - -curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.bz2 | tar xjf - -cd gcc-$GCC - -# FIXME(#49246): Remove the `sed` below. -# -# On 2018 March 21st, two Travis builders' cache for Docker are suddenly invalidated. Normally this -# is fine, because we just need to rebuild the Docker image. However, it reveals a network issue: -# downloading from `ftp://gcc.gnu.org/` from Travis (using passive mode) often leads to "Connection -# timed out" error, and even when the download completed, the file is usually corrupted. This causes -# nothing to be landed that day. -# -# We observed that the `gcc-4.8.5.tar.bz2` above can be downloaded successfully, so as a stability -# improvement we try to download from the HTTPS mirror instead. Turns out this uncovered the third -# bug: the host `gcc.gnu.org` and `cygwin.com` share the same IP, and the TLS certificate of the -# latter host is presented to `wget`! Therefore, we choose to download from the insecure HTTP server -# instead here. -# -sed -i'' 's|ftp://gcc\.gnu\.org/|http://gcc.gnu.org/|g' ./contrib/download_prerequisites - -./contrib/download_prerequisites -mkdir ../gcc-build -cd ../gcc-build -hide_output ../gcc-$GCC/configure \ - --prefix=/rustroot \ - --enable-languages=c,c++ -hide_output make -j10 -hide_output make install -ln -nsf gcc /rustroot/bin/cc - -cd .. -rm -rf gcc-build -rm -rf gcc-$GCC -yum erase -y gcc gcc-c++ binutils diff --git a/src/ci/docker/dist-i686-linux/build-git.sh b/src/ci/docker/dist-i686-linux/build-git.sh deleted file mode 100755 index aa31f50ba03..00000000000 --- a/src/ci/docker/dist-i686-linux/build-git.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex -source shared.sh - -curl -L https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz | tar xzf - - -cd git-2.10.0 -make configure -hide_output ./configure --prefix=/rustroot -hide_output make -j10 -hide_output make install - -cd .. -rm -rf git-2.10.0 diff --git a/src/ci/docker/dist-i686-linux/build-headers.sh b/src/ci/docker/dist-i686-linux/build-headers.sh deleted file mode 100755 index 2f15114d6f9..00000000000 --- a/src/ci/docker/dist-i686-linux/build-headers.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex -source shared.sh - -curl https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.2.84.tar.xz | unxz | tar x - -cd linux-3.2.84 -hide_output make mrproper -hide_output make INSTALL_HDR_PATH=dest headers_install - -find dest/include \( -name .install -o -name ..install.cmd \) -delete -yes | cp -fr dest/include/* /usr/include - -cd .. -rm -rf linux-3.2.84 diff --git a/src/ci/docker/dist-i686-linux/build-openssl.sh b/src/ci/docker/dist-i686-linux/build-openssl.sh deleted file mode 100755 index e7226ace020..00000000000 --- a/src/ci/docker/dist-i686-linux/build-openssl.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex -source shared.sh - -VERSION=1.0.2k -URL=https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/openssl-$VERSION.tar.gz - -curl $URL | tar xzf - - -cd openssl-$VERSION -hide_output ./config --prefix=/rustroot shared -fPIC -hide_output make -j10 -hide_output make install -cd .. -rm -rf openssl-$VERSION - -# Make the system cert collection available to the new install. -ln -nsf /etc/pki/tls/cert.pem /rustroot/ssl/ diff --git a/src/ci/docker/dist-i686-linux/build-python.sh b/src/ci/docker/dist-i686-linux/build-python.sh deleted file mode 100755 index c6b8cdde4b9..00000000000 --- a/src/ci/docker/dist-i686-linux/build-python.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex -source shared.sh - -curl https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz | \ - tar xzf - - -mkdir python-build -cd python-build - -# Gotta do some hackery to tell python about our custom OpenSSL build, but other -# than that fairly normal. -CFLAGS='-I /rustroot/include' LDFLAGS='-L /rustroot/lib -L /rustroot/lib64' \ - hide_output ../Python-2.7.12/configure --prefix=/rustroot -hide_output make -j10 -hide_output make install - -cd .. -rm -rf python-build -rm -rf Python-2.7.12 diff --git a/src/ci/docker/dist-i686-linux/shared.sh b/src/ci/docker/dist-i686-linux/shared.sh deleted file mode 100644 index 97e6d2908cf..00000000000 --- a/src/ci/docker/dist-i686-linux/shared.sh +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -hide_output() { - set +x - on_err=" -echo ERROR: An error was encountered with the build. -cat /tmp/build.log -exit 1 -" - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - $@ &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x -} |
