summary refs log tree commit diff
diff options
context:
space:
mode:
authorMateusz MikuĊ‚a <matti@marinelayer.io>2019-04-11 18:57:13 +0200
committerPietro Albini <pietro@pietroalbini.org>2019-04-26 16:55:57 +0200
commit6fcfdd5cb672d33d39341b80fbcbea217ea9002c (patch)
tree9e87f0790d03e9cef1c3ecadd58d532920582289
parent2bc1d406dd5eda8bb3fd0d08a9a1a534740f9e79 (diff)
downloadrust-6fcfdd5cb672d33d39341b80fbcbea217ea9002c.tar.gz
rust-6fcfdd5cb672d33d39341b80fbcbea217ea9002c.zip
musl: do not compress debug section
Old linkers are unable to decompress them and fail to link binaries
-rw-r--r--src/ci/docker/dist-x86_64-musl/Dockerfile8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile
index 560df2f3a57..21a9023a458 100644
--- a/src/ci/docker/dist-x86_64-musl/Dockerfile
+++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
@@ -21,8 +21,8 @@ WORKDIR /build/
 
 COPY scripts/musl-toolchain.sh /build/
 # We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
-RUN CFLAGS="-Wa,-mrelax-relocations=no" \
-    CXXFLAGS="-Wa,-mrelax-relocations=no" \
+RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
+    CXXFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
     bash musl-toolchain.sh x86_64 && rm -rf build
 
 COPY scripts/sccache.sh /scripts/
@@ -38,7 +38,9 @@ ENV RUST_CONFIGURE_ARGS \
 # way to produce "super compatible" binaries.
 #
 # See: https://github.com/rust-lang/rust/issues/34978
-ENV CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no
+# And: https://github.com/rust-lang/rust/issues/59411
+ENV CFLAGS_x86_64_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none \
+    -Wl,--compress-debug-sections=none"
 
 ENV HOSTS=x86_64-unknown-linux-musl \
     CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \