diff --git a/src/ci/docker/scripts/musl-toolchain.sh b/src/ci/docker/scripts/musl-toolchain.sh index 95b7c2869c91f..3caf2852ede42 100644 --- a/src/ci/docker/scripts/musl-toolchain.sh +++ b/src/ci/docker/scripts/musl-toolchain.sh @@ -29,6 +29,10 @@ TARGET=$ARCH-linux-musl OUTPUT=/usr/local shift +# Ancient binutils versions don't understand debug symbols produced by more recent tools. +# Apparently applying `-fPIC` everywhere allows them to link successfully. +export CFLAGS="-fPIC $CFLAGS" + git clone https://github.com/richfelker/musl-cross-make -b v0.9.7 cd musl-cross-make