Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

Commit

Permalink
Move gcc later in the build order.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rillian committed Feb 1, 2017
1 parent e46fabc commit 941295c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions slaves/dist/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
#
Expand Down
2 changes: 1 addition & 1 deletion slaves/dist/build_gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 941295c

Please sign in to comment.