From c764890d7c508b401764c79bde9c0f3c430138e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Wed, 27 Mar 2019 18:37:21 +0100 Subject: [PATCH] musl: build toolchain libs with -fPIC --- src/ci/docker/scripts/musl-toolchain.sh | 4 ++++ 1 file changed, 4 insertions(+) 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