Skip to content

Commit

Permalink
cross-images: hack to fix arm-unknown-linux-musleabihf build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pkgw committed Jan 14, 2021
1 parent 4a349d7 commit 23c4168
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cross-images/06_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ if [ "$rust_platform" = aarch64-unknown-linux-musl ] ; then
RUSTFLAGS="$RUSTFLAGS -C link-arg=-lgcc"
fi

if [ "$rust_platform" = arm-unknown-linux-musleabihf ] ; then
# 2021 Jan: workaround for
# https://github.com/rust-lang/compiler-builtins/issues/353 . -lgcc is
# already at the end of the link line, which is supposed to prevent the
# error, so I guess we have to force the issue.
RUSTFLAGS="$RUSTFLAGS -C link-arg=-Wl,--allow-multiple-definition"
fi

cat <<EOF >/environ
export PATH=/alpine/home/rust/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Expand Down

0 comments on commit 23c4168

Please sign in to comment.