Skip to content

Commit 23c4168

Browse files
committed
cross-images: hack to fix arm-unknown-linux-musleabihf build
Upgrading to reqwest 0.11 seems to have caused us to start hitting rust-lang/compiler-builtins#353 for some reason. `-lgcc` is already at the end of our link lines, which is supposed to prevent the error, so I guess we have to force the issue with the hacky `--allow-multiple-definition` linker flag.
1 parent 4a349d7 commit 23c4168

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cross-images/06_setup_env.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ if [ "$rust_platform" = aarch64-unknown-linux-musl ] ; then
3131
RUSTFLAGS="$RUSTFLAGS -C link-arg=-lgcc"
3232
fi
3333

34+
if [ "$rust_platform" = arm-unknown-linux-musleabihf ] ; then
35+
# 2021 Jan: workaround for
36+
# https://github.com/rust-lang/compiler-builtins/issues/353 . -lgcc is
37+
# already at the end of the link line, which is supposed to prevent the
38+
# error, so I guess we have to force the issue.
39+
RUSTFLAGS="$RUSTFLAGS -C link-arg=-Wl,--allow-multiple-definition"
40+
fi
41+
3442
cat <<EOF >/environ
3543
export PATH=/alpine/home/rust/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
3644

0 commit comments

Comments
 (0)