bug 1354216 - fix cctools-port build scripts. r=mshal

The cctools-port build scripts were pulling and building the master branch
of the cctools-port repo, which means they'd build whatever was there
when they get triggered. I think this was copied from my build-cctools
script which did the same thing, so it's my fault in the end! This patch
pins a revision in the script so we'll build the same thing until we
explicitly update.

I also fixed the scripts to use git instead of tc-vcs, since tc-vcs prints
misleading error messages, and nothing else uses that anymore.

Finally, I removed the build-cctools script, since all the builds are using
cctools-port now so it doesn't serve any useful purpose.

MozReview-Commit-ID: 5myqHS4duor

--HG--
extra : rebase_source : 11231cbe49c7ba830a880bfa4600f0a24d61471d
This commit is contained in:
Ted Mielczarek 2017-04-10 15:38:24 -04:00
parent 45f5064a95
commit 59f99f786d
4 changed files with 9 additions and 87 deletions

View File

@ -9,7 +9,7 @@ UPLOAD_DIR=$WORKSPACE/artifacts
# Repository info
: CROSSTOOL_PORT_REPOSITORY ${CROSSTOOL_PORT_REPOSITORY:=https://github.com/tpoechtrager/cctools-port}
: CROSSTOOL_PORT_REV ${CROSSTOOL_PORT_REV:=master}
: CROSSTOOL_PORT_REV ${CROSSTOOL_PORT_REV:=8e9c3f2506b51cf56725eaa60b6e90e240e249ca}
# Set some crosstools-port directories
CROSSTOOLS_SOURCE_DIR=$WORKSPACE/crosstools-port
@ -24,8 +24,9 @@ TARGET_TRIPLE=x86_64-apple-darwin11
# Create our directories
mkdir -p $CROSSTOOLS_BUILD_DIR
tc-vcs checkout --force-clone $CROSSTOOLS_SOURCE_DIR $CROSSTOOL_PORT_REPOSITORY $CROSSTOOL_PORT_REPOSITORY $CROSSTOOL_PORT_REV
git clone --no-checkout $CROSSTOOL_PORT_REPOSITORY $CROSSTOOLS_SOURCE_DIR
cd $CROSSTOOLS_SOURCE_DIR
git checkout $CROSSTOOL_PORT_REV
echo "Building from commit hash `git rev-parse $CROSSTOOL_PORT_REV`..."
# Fetch clang from tooltool

View File

@ -9,7 +9,7 @@ UPLOAD_DIR=$WORKSPACE/artifacts
# Repository info
: CROSSTOOL_PORT_REPOSITORY ${CROSSTOOL_PORT_REPOSITORY:=https://github.com/tpoechtrager/cctools-port}
: CROSSTOOL_PORT_REV ${CROSSTOOL_PORT_REV:=master}
: CROSSTOOL_PORT_REV ${CROSSTOOL_PORT_REV:=8e9c3f2506b51cf56725eaa60b6e90e240e249ca}
# Set some crosstools-port directories
CROSSTOOLS_SOURCE_DIR=$WORKSPACE/crosstools-port
@ -20,8 +20,9 @@ CLANG_DIR=$WORKSPACE/clang
# Create our directories
mkdir -p $CROSSTOOLS_BUILD_DIR
tc-vcs checkout --force-clone $CROSSTOOLS_SOURCE_DIR $CROSSTOOL_PORT_REPOSITORY $CROSSTOOL_PORT_REPOSITORY $CROSSTOOL_PORT_REV
git clone --no-checkout $CROSSTOOL_PORT_REPOSITORY $CROSSTOOLS_SOURCE_DIR
cd $CROSSTOOLS_SOURCE_DIR
git checkout $CROSSTOOL_PORT_REV
echo "Building from commit hash `git rev-parse $CROSSTOOL_PORT_REV`..."
# Fetch clang from tooltool

View File

@ -1,82 +0,0 @@
#!/bin/bash
set -x -e -v
# This script is for building cctools (Apple's binutils) for Linux using
# crosstool-ng (https://github.com/diorcety/crosstool-ng).
WORKSPACE=$HOME/workspace
UPLOAD_DIR=$WORKSPACE/artifacts
# Repository info
: CROSSTOOL_NG_REPOSITORY ${CROSSTOOL_NG_REPOSITORY:=https://github.com/diorcety/crosstool-ng}
: CROSSTOOL_NG_REV ${CROSSTOOL_NG_REV:=master}
# hacky
ln -s `which gcc` ~/bin/x86_64-linux-gnu-gcc
export PATH=$PATH:~/bin
# Set some crosstools-ng directories
CT_TOP_DIR=$WORKSPACE/crosstool-ng-build
CT_PREFIX_DIR=$WORKSPACE/cctools
CT_SRC_DIR=$CT_TOP_DIR/src
CT_TARBALLS_DIR=$CT_TOP_DIR
CT_WORK_DIR=$CT_SRC_DIR
CT_LIB_DIR=$WORKSPACE/crosstool-ng
CT_BUILD_DIR=$CT_TOP_DIR/build
CT_LLVM_DIR=$WORKSPACE/clang
CT_BUILDTOOLS_PREFIX_DIR=$CT_PREFIX_DIR
# Create our directories
rm -rf $CT_TOP_DIR
mkdir $CT_TOP_DIR
rm -rf $CT_PREFIX_DIR
mkdir $CT_PREFIX_DIR
mkdir -p $CT_SRC_DIR
# Clone the crosstool-ng repo
tc-vcs checkout $CT_LIB_DIR $CROSSTOOL_NG_REPOSITORY $CROSSTOOL_NG_REPOSITORY $CROSSTOOL_NG_REV
# Fetch clang from tooltool
cd $WORKSPACE
wget -O tooltool.py https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py
chmod +x tooltool.py
: TOOLTOOL_CACHE ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
export TOOLTOOL_CACHE
wget ${GECKO_HEAD_REPOSITORY}/raw-file/${GECKO_HEAD_REV}/browser/config/tooltool-manifests/linux64/clang.manifest
python tooltool.py -v --manifest=clang.manifest fetch
# Copy clang into the crosstools-ng srcdir
cp -Rp $CT_LLVM_DIR $CT_SRC_DIR
# Configure crosstools-ng
sed=sed
CT_CONNECT_TIMEOUT=5
CT_BINUTILS_VERSION=809
CT_PATCH_ORDER=bundled
CT_BUILD=x86_64-linux-gnu
CT_HOST=x86_64-linux-gnu
CT_TARGET=x86_64-apple-darwin10
CT_LLVM_FULLNAME=clang
cd $CT_TOP_DIR
# gets a bit too verbose here
set +x
. $CT_LIB_DIR/scripts/functions
. $CT_LIB_DIR/scripts/build/binutils/cctools.sh
# Build cctools
do_binutils_get
do_binutils_extract
do_binutils_for_host
set -x
strip $CT_PREFIX_DIR/bin/*
# Put a tarball in the artifacts dir
mkdir -p $UPLOAD_DIR
tar czf $UPLOAD_DIR/cctools.tar.gz -C $WORKSPACE `basename $CT_PREFIX_DIR`

View File

@ -18,8 +18,10 @@ UPLOAD_DIR=$WORKSPACE/artifacts
mkdir -p $UPLOAD_DIR $STAGE
cd $WORKSPACE
tc-vcs checkout --force-clone libdmg-hfsplus $LIBDMG_REPOSITORY $LIBDMG_REPOSITORY $LIBDMG_REV
git clone --no-checkout $LIBDMG_REPOSITORY libdmg-hfsplus
cd libdmg-hfsplus
git checkout $LIBDMG_REV
# Make a source archive
git archive ${LIBDMG_REV} | xz > $UPLOAD_DIR/libdmg-hfsplus.tar.xz
cmake .