Skip to content

Commit 9a08f40

Browse files
committed
travis: Move -mrelax-relocations to Docker config
This doesn't belong in rustbuild itself, and now that we have only rustbuild we can move this out of the build system.
1 parent 305aca8 commit 9a08f40

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/bootstrap/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -828,17 +828,6 @@ impl Build {
828828
if target.contains("apple-darwin") {
829829
base.push("-stdlib=libc++".into());
830830
}
831-
// This is a hack, because newer binutils broke things on some vms/distros
832-
// (i.e., linking against unknown relocs disabled by the following flag)
833-
// See: https://github.com/rust-lang/rust/issues/34978
834-
match target {
835-
"i586-unknown-linux-gnu" |
836-
"i686-unknown-linux-musl" |
837-
"x86_64-unknown-linux-musl" => {
838-
base.push("-Wa,-mrelax-relocations=no".into());
839-
},
840-
_ => {},
841-
}
842831
return base
843832
}
844833

src/ci/docker/linux-tested-targets/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ ENV RUST_CONFIGURE_ARGS \
3434
--musl-root-x86_64=/musl-x86_64 \
3535
--musl-root-i686=/musl-i686
3636

37+
# Newer binutils broke things on some vms/distros (i.e., linking against
38+
# unknown relocs disabled by the following flag), so we need to go out of our
39+
# way to produce "super compatible" binaries.
40+
#
41+
# See: https://github.com/rust-lang/rust/issues/34978
42+
ENV CFLAGS_i686_unknown_linux_gnu=-Wa,-mrelax-relocations=no \
43+
CFLAGS_x86_64_unknown_linux_gnu=-Wa,-mrelax-relocations=no
44+
3745
ENV SCRIPT \
3846
python2.7 ../x.py test \
3947
--target x86_64-unknown-linux-musl \

0 commit comments

Comments
 (0)