Skip to content

travis: Enable testing i686 musl #39227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ci/docker/linux-tested-targets/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ ENV RUST_CONFIGURE_ARGS \
--musl-root-x86_64=/musl-x86_64 \
--musl-root-i686=/musl-i686

# FIXME should also test i686-unknown-linux-musl
ENV SCRIPT \
python2.7 ../x.py test \
--target x86_64-unknown-linux-musl \
--target i686-unknown-linux-musl \
--target i586-unknown-linux-gnu \
&& \
python2.7 ../x.py dist \
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/linux-tested-targets/build-musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cp lib/libunwind.a /musl-x86_64/lib
# for x86_64 again)
rm -rf *
# for i686
CFLAGS="$CFLAGS -m32 -g" CXXFLAGS="$CXXFLAGS -m32 -g" cmake ../libunwind-release_37 \
CFLAGS="$CFLAGS -m32" CXXFLAGS="$CXXFLAGS -m32" cmake ../libunwind-release_37 \
-DLLVM_PATH=/build/llvm-release_37 \
-DLIBUNWIND_ENABLE_SHARED=0
make -j10
Expand Down
14 changes: 14 additions & 0 deletions src/librustc_back/target/i686_unknown_linux_musl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ pub fn target() -> TargetResult {
base.pre_link_args.push("-m32".to_string());
base.pre_link_args.push("-Wl,-melf_i386".to_string());

// The unwinder used by i686-unknown-linux-musl, the LLVM libunwind
// implementation, apparently relies on frame pointers existing... somehow.
// It's not clear to me why nor where this dependency is introduced, but the
// test suite does not pass with frame pointers eliminated and it passes
// with frame pointers present.
//
// If you think that this is no longer necessary, then please feel free to
// ignore! If it still passes the test suite and the bots then sounds good
// to me.
//
// This may or may not be related to this bug:
// https://llvm.org/bugs/show_bug.cgi?id=30879
base.eliminate_frame_pointer = false;

Ok(Target {
llvm_target: "i686-unknown-linux-musl".to_string(),
target_endian: "little".to_string(),
Expand Down