about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
-rw-r--r--tests/run-make/issue-47551/Makefile10
-rw-r--r--tests/run-make/link-eh-frame-terminator/eh_frame-terminator.rs (renamed from tests/run-make/issue-47551/eh_frame-terminator.rs)0
-rw-r--r--tests/run-make/link-eh-frame-terminator/rmake.rs20
4 files changed, 20 insertions, 11 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index fa340a02213..2a1b7500e5b 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -19,7 +19,6 @@ run-make/foreign-rust-exceptions/Makefile
 run-make/incr-add-rust-src-component/Makefile
 run-make/issue-35164/Makefile
 run-make/issue-36710/Makefile
-run-make/issue-47551/Makefile
 run-make/issue-69368/Makefile
 run-make/issue-84395-lto-embed-bitcode/Makefile
 run-make/issue-88756-default-output/Makefile
diff --git a/tests/run-make/issue-47551/Makefile b/tests/run-make/issue-47551/Makefile
deleted file mode 100644
index 3fe0a6e74e0..00000000000
--- a/tests/run-make/issue-47551/Makefile
+++ /dev/null
@@ -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'
diff --git a/tests/run-make/issue-47551/eh_frame-terminator.rs b/tests/run-make/link-eh-frame-terminator/eh_frame-terminator.rs
index 0c90d8c791c..0c90d8c791c 100644
--- a/tests/run-make/issue-47551/eh_frame-terminator.rs
+++ b/tests/run-make/link-eh-frame-terminator/eh_frame-terminator.rs
diff --git a/tests/run-make/link-eh-frame-terminator/rmake.rs b/tests/run-make/link-eh-frame-terminator/rmake.rs
new file mode 100644
index 00000000000..750d068ac98
--- /dev/null
+++ b/tests/run-make/link-eh-frame-terminator/rmake.rs
@@ -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");
+}