rewrite and rename issue-47551 to rmake

This commit is contained in:
Oneirical 2024-07-11 15:36:06 -04:00
parent 2d5a628a1d
commit 83234a0f21
4 changed files with 20 additions and 11 deletions

View File

@ -19,7 +19,6 @@ run-make/foreign-rust-exceptions/Makefile
run-make/incr-add-rust-src-component/Makefile run-make/incr-add-rust-src-component/Makefile
run-make/issue-35164/Makefile run-make/issue-35164/Makefile
run-make/issue-36710/Makefile run-make/issue-36710/Makefile
run-make/issue-47551/Makefile
run-make/issue-69368/Makefile run-make/issue-69368/Makefile
run-make/issue-84395-lto-embed-bitcode/Makefile run-make/issue-84395-lto-embed-bitcode/Makefile
run-make/issue-88756-default-output/Makefile run-make/issue-88756-default-output/Makefile

View File

@ -1,10 +0,0 @@
# only-linux
# ignore-32bit
include ../tools.mk
all:
# --target $(TARGET) ensures the right gcc flags are used for cross compilation
$(RUSTC) --target $(TARGET) eh_frame-terminator.rs
$(call RUN,eh_frame-terminator) | $(CGREP) '1122334455667788'
objdump --dwarf=frames $(TMPDIR)/eh_frame-terminator | $(CGREP) 'ZERO terminator'

View File

@ -0,0 +1,20 @@
// The gcc driver is supposed to add a terminator to link files, and the rustc
// driver previously failed to do this, resulting in a segmentation fault
// with an older version of LLVM. This test checks that the terminator is present
// after the fix in #85395.
// See https://github.com/rust-lang/rust/issues/47551
//FIXME(Oneirical): See if it works on anything other than only linux and 64 bit
// maybe riscv64gc-unknown-linux-gnu
use run_make_support::{llvm_objdump, run, rustc};
fn main() {
rustc().input("eh_frame-terminator.rs").run();
run("eh_frame-terminator").assert_stdout_contains("1122334455667788");
llvm_objdump()
.arg("--dwarf=frames")
.input("eh_frame-terminator")
.run()
.assert_stdout_contains("ZERO terminator");
}