taskcluster/scripts/misc/build-gcc-6-linux.sh
author Nathan Froyd <froydnj@mozilla.com>
Fri, 15 Mar 2019 01:29:14 +0000
changeset 521995 292ed1bb9143e7853110e9a7574c168ae3780932
parent 521822 779dcbea91ce69857c4aa3a9d1823905cb45ee03
permissions -rwxr-xr-x
Bug 1451104 - part 4 - sync up gcc-related toolchains and linux64-binutils binutils version; r=glandium We're going to copy an x86_64-unknown-linux-gnu ld into the clang build, which clang will then use in preference to things on PATH. We therefore need to ensure that this ld is the same ld as would be used for other builds, such as PGO. This change is the most expedient way to do that; future work will make the gcc job(s) depend on linux64-binutils directly. Differential Revision: https://phabricator.services.mozilla.com/D22882

#!/bin/bash
set -e

# This script is for building GCC 6 for Linux.

WORKSPACE=$HOME/workspace
HOME_DIR=$WORKSPACE/build
UPLOAD_DIR=$HOME/artifacts

root_dir=$HOME_DIR
data_dir=$HOME_DIR/src/build/unix/build-gcc

. $data_dir/build-gcc.sh

gcc_version=6.4.0
gcc_ext=xz
binutils_version=2.31.1
binutils_ext=xz

pushd $root_dir/gcc-$gcc_version
ln -sf ../gmp-5.1.3 gmp
ln -sf ../isl-0.15 isl
ln -sf ../mpc-0.8.2 mpc
ln -sf ../mpfr-3.1.5 mpfr
popd

build_binutils
build_gcc

# Put a tarball in the artifacts dir
mkdir -p $UPLOAD_DIR
cp $HOME_DIR/gcc.tar.* $UPLOAD_DIR