From 941295cb1e9b2654c83d05f0e04c681f5f46452a Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Wed, 1 Feb 2017 11:48:01 -0800 Subject: [PATCH] Move gcc later in the build order. Building openssl and curl first lets us use TLS for all later downloads. The curl/openssl included with our Centos:5 base has compatibility problems with many modern websites. This slows the cycle time since we update openssl and curl more often than gcc, which was previously first since it's one of the slowest packages to build. --- slaves/dist/Dockerfile | 14 +++++++------- slaves/dist/build_gcc.sh | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slaves/dist/Dockerfile b/slaves/dist/Dockerfile index 147864d..9f3468c 100644 --- a/slaves/dist/Dockerfile +++ b/slaves/dist/Dockerfile @@ -27,13 +27,6 @@ RUN mkdir /buildslave && chown rustbuild:rustbuild /buildslave RUN mkdir /home/rustbuild RUN chown rustbuild:rustbuild /home/rustbuild -# Install gcc 4.7 which has C++11 support which is required by LLVM -# -# After we're done building we erase the binutils/gcc installs from CentOS to -# ensure that we always use the ones that we just built. -COPY dist/build_gcc.sh /build/ -RUN /bin/bash build_gcc.sh && rm -rf /build - # 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 @@ -50,6 +43,13 @@ RUN /bin/bash build_openssl.sh && rm -rf /build COPY dist/build_curl.sh /build/ RUN /bin/bash build_curl.sh +# Install gcc 4.7 which has C++11 support which is required by LLVM +# +# After we're done building we erase the binutils/gcc installs from CentOS to +# ensure that we always use the ones that we just built. +COPY dist/build_gcc.sh /build/ +RUN /bin/bash build_gcc.sh && rm -rf /build + # 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. # diff --git a/slaves/dist/build_gcc.sh b/slaves/dist/build_gcc.sh index e1cc7c1..fb1a871 100644 --- a/slaves/dist/build_gcc.sh +++ b/slaves/dist/build_gcc.sh @@ -6,7 +6,7 @@ VERSION=4.7.4 SHA256=92e61c6dc3a0a449e62d72a38185fda550168a86702dea07125ebd3ec3996282 yum install -y wget -curl http://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.bz2 | \ +curl https://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.bz2 | \ tee >(sha256sum > gcc-$VERSION.tar.bz2.sha256) | tar xjf - test $SHA256 = $(cut -d ' ' -f 1 gcc-$VERSION.tar.bz2.sha256) || exit 1