@@ -4,6 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
44 g++ \
55 make \
66 file \
7+ wget \
78 curl \
89 ca-certificates \
910 python2.7 \
@@ -18,19 +19,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1819
1920WORKDIR /build/
2021
21- COPY scripts/musl.sh /build/
22+ COPY scripts/musl-toolchain .sh /build/
2223# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
23- RUN CC=gcc \
24- CFLAGS="-Wa,-mrelax-relocations=no" \
25- CXX=g++ \
26- CXXFLAGS="-Wa,-mrelax-relocations=no" \
27- bash musl.sh x86_64 && rm -rf /build
24+ # TODO: Check what this issue is and if we can ignore it
25+
26+ RUN bash musl-toolchain.sh x86_64-linux-musl && rm -rf build
2827
2928COPY scripts/sccache.sh /scripts/
3029RUN sh /scripts/sccache.sh
3130
3231ENV RUST_CONFIGURE_ARGS \
33- --musl-root-x86_64=/musl- x86_64 \
32+ --musl-root-x86_64=/usr/local/ x86_64-linux-musl \
3433 --enable-extended \
3534 --disable-docs
3635
@@ -39,9 +38,14 @@ ENV RUST_CONFIGURE_ARGS \
3938# way to produce "super compatible" binaries.
4039#
4140# See: https://github.com/rust-lang/rust/issues/34978
42- ENV CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no
41+ # ENV CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no
42+
43+ ENV HOSTS=x86_64-unknown-linux-musl \
44+ CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \
45+ CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++
4346
44- ENV HOSTS=x86_64-unknown-linux-musl
47+ # CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER=musl-gcc \
48+ # CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_RUNNER="qemu-arm -L /musl-arm"
4549
4650ENV RUSTFLAGS="-C target-feature=-crt-static"
4751
0 commit comments