From 305aca86f9d8d132650b495f610f9abe5239fec6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 21 Feb 2017 14:18:50 -0800 Subject: [PATCH] travis: Compile a more compatible libc.a for musl The mitigations for #34978 involve passing `-Wa,-mrelax-relocations=no` to all C code we compile, and we just forgot to pass it when compiling musl itself. Closes #39979 --- src/ci/docker/linux-tested-targets/build-musl.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ci/docker/linux-tested-targets/build-musl.sh b/src/ci/docker/linux-tested-targets/build-musl.sh index 260dc11509f47..ce62c392241d8 100644 --- a/src/ci/docker/linux-tested-targets/build-musl.sh +++ b/src/ci/docker/linux-tested-targets/build-musl.sh @@ -11,7 +11,10 @@ set -ex -export CFLAGS="-fPIC" +# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well +export CFLAGS="-fPIC -Wa,-mrelax-relocations=no" +export CXXFLAGS="-Wa,-mrelax-relocations=no" + MUSL=musl-1.1.14 curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf - cd $MUSL