Skip to content

Commit

Permalink
travis: Move -mrelax-relocations to Docker config
Browse files Browse the repository at this point in the history
This doesn't belong in rustbuild itself, and now that we have only rustbuild we
can move this out of the build system.
  • Loading branch information
alexcrichton committed Feb 21, 2017
1 parent 305aca8 commit 9a08f40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,17 +828,6 @@ impl Build {
if target.contains("apple-darwin") {
base.push("-stdlib=libc++".into());
}
// This is a hack, because newer binutils broke things on some vms/distros
// (i.e., linking against unknown relocs disabled by the following flag)
// See: https://github.com/rust-lang/rust/issues/34978
match target {
"i586-unknown-linux-gnu" |
"i686-unknown-linux-musl" |
"x86_64-unknown-linux-musl" => {
base.push("-Wa,-mrelax-relocations=no".into());
},
_ => {},
}
return base
}

Expand Down
8 changes: 8 additions & 0 deletions src/ci/docker/linux-tested-targets/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ ENV RUST_CONFIGURE_ARGS \
--musl-root-x86_64=/musl-x86_64 \
--musl-root-i686=/musl-i686

# Newer binutils broke things on some vms/distros (i.e., linking against
# unknown relocs disabled by the following flag), so we need to go out of our
# way to produce "super compatible" binaries.
#
# See: https://github.com/rust-lang/rust/issues/34978
ENV CFLAGS_i686_unknown_linux_gnu=-Wa,-mrelax-relocations=no \
CFLAGS_x86_64_unknown_linux_gnu=-Wa,-mrelax-relocations=no

ENV SCRIPT \
python2.7 ../x.py test \
--target x86_64-unknown-linux-musl \
Expand Down

0 comments on commit 9a08f40

Please sign in to comment.