about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2019-03-20 04:34:01 +0800
committerGitHub <noreply@github.com>2019-03-20 04:34:01 +0800
commitb3490cf418cab2a3c2ab9b79f05c36cac8d5de7c (patch)
tree0364ab7e266423048a6a58097fff513f3eb169e9
parent7a4df3b53da369110984a2b57419c05a53e33b38 (diff)
parentc843fe710bb7fb454d68505c8000c0a50bc2a729 (diff)
downloadrust-b3490cf418cab2a3c2ab9b79f05c36cac8d5de7c.tar.gz
rust-b3490cf418cab2a3c2ab9b79f05c36cac8d5de7c.zip
Rollup merge of #58986 - cuviper:ppc64-binutils, r=alexcrichton
[CI] Update binutils for powerpc64 and powerpc64le

Cargo powerpc64 and powerpc64le are seeing `SIGILL` crashes in openssl,
which was found to be a linking problem, fixed by newer binutils. See
<https://github.com/rust-lang/rust/issues/57345#issuecomment-462094555>

For powerpc64 we're using crosstool-ng, which doesn't offer a newer
binutils version, but we can just compile it separately. On powerpc64le
we're already building binutils. Both are now updated to binutils 2.32.

Closes rust-lang/cargo#6320
Closes rust-lang/rust#57345
Closes rust-lang/rustup.rs#1620

r? @alexcrichton
-rwxr-xr-xsrc/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh20
-rwxr-xr-xsrc/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh2
2 files changed, 21 insertions, 1 deletions
diff --git a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh b/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh
index f7aa2cd3268..fc53849a2ad 100755
--- a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh
+++ b/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh
@@ -3,9 +3,29 @@ set -ex
 
 source shared.sh
 
+BINUTILS=2.32
+TARGET=powerpc64-unknown-linux-gnu
+PREFIX=/x-tools/$TARGET
+SYSROOT=$PREFIX/$TARGET/sysroot
+
 mkdir build
 cd build
 cp ../powerpc64-linux-gnu.config .config
 hide_output ct-ng build
 cd ..
 rm -rf build
+
+chmod -R u+w $PREFIX
+
+# Next, download and build newer binutils.
+mkdir binutils-$TARGET
+pushd binutils-$TARGET
+curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 | tar xjf -
+mkdir binutils-build
+cd binutils-build
+hide_output ../binutils-$BINUTILS/configure --target=$TARGET \
+  --prefix=$PREFIX --with-sysroot=$SYSROOT
+hide_output make -j10
+hide_output make install
+popd
+rm -rf binutils-$TARGET
diff --git a/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh b/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh
index a01803d9c8f..f866a24287f 100755
--- a/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh
+++ b/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh
@@ -4,7 +4,7 @@ set -ex
 
 source shared.sh
 
-BINUTILS=2.25.1
+BINUTILS=2.32
 GCC=5.3.0
 TARGET=powerpc64le-linux-gnu
 SYSROOT=/usr/local/$TARGET/sysroot