From ca32d9a7258c58943d7d73795e44cbce8d735590 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Fri, 9 Apr 2021 16:54:05 +0100 Subject: [PATCH 1/6] Fix tests, fix s390x breakage --- debian/changelog | 6 + .../0001-Revert-Auto-merge-of-79547.patch | 103 ++++++++++++++++++ ...838f612da2ef6c359aaea8bf0a69ad76716a.patch | 25 +++++ debian/patches/series | 2 + debian/patches/u-ignore-asm-unsupported.patch | 34 ++++++ 5 files changed, 170 insertions(+) create mode 100644 debian/patches/0001-Revert-Auto-merge-of-79547.patch create mode 100644 debian/patches/9756838f612da2ef6c359aaea8bf0a69ad76716a.patch create mode 100644 debian/patches/u-ignore-asm-unsupported.patch diff --git a/debian/changelog b/debian/changelog index a9a37c6e60..c430169ab8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rustc (1.50.0+dfsg1-1~exp2) UNRELEASED; urgency=medium + + * Fix tests, fix s390x breakage. + + -- Ximin Luo Fri, 09 Apr 2021 16:53:52 +0100 + rustc (1.50.0+dfsg1-1~exp1) experimental; urgency=medium * New upstream release. diff --git a/debian/patches/0001-Revert-Auto-merge-of-79547.patch b/debian/patches/0001-Revert-Auto-merge-of-79547.patch new file mode 100644 index 0000000000..bf95a214fd --- /dev/null +++ b/debian/patches/0001-Revert-Auto-merge-of-79547.patch @@ -0,0 +1,103 @@ +From eaf7ea1fc339e1ff348ed941ed2e8c4d66f3e458 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Thu, 18 Feb 2021 19:14:58 -0800 +Subject: [PATCH] Revert "Auto merge of #79547 - erikdesjardins:byval, r=nagisa" + +This reverts commit a094ff9590b83c8f94d898f92c2964a5803ded06, reversing +changes made to d37afad0cc87bf709ad10c85319296ac53030f03. + +See https://github.com/rust-lang/rust/issues/80810 for more background +--- + compiler/rustc_middle/src/ty/layout.rs | 12 ++++++------ + ...return-value-in-reg.rs => return-value-in-reg.rs} | 4 ++-- + src/test/codegen/union-abi.rs | 11 +++-------- + 3 files changed, 11 insertions(+), 16 deletions(-) + rename src/test/codegen/{arg-return-value-in-reg.rs => return-value-in-reg.rs} (74%) + +diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs +index b545b92c9252..545f6aee1a21 100644 +--- a/compiler/rustc_middle/src/ty/layout.rs ++++ b/compiler/rustc_middle/src/ty/layout.rs +@@ -2849,7 +2849,7 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) { + || abi == SpecAbi::RustIntrinsic + || abi == SpecAbi::PlatformIntrinsic + { +- let fixup = |arg: &mut ArgAbi<'tcx, Ty<'tcx>>| { ++ let fixup = |arg: &mut ArgAbi<'tcx, Ty<'tcx>>, is_ret: bool| { + if arg.is_ignore() { + return; + } +@@ -2887,9 +2887,9 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) { + _ => return, + } + +- // Pass and return structures up to 2 pointers in size by value, matching `ScalarPair`. +- // LLVM will usually pass these in 2 registers, which is more efficient than by-ref. +- let max_by_val_size = Pointer.size(cx) * 2; ++ // Return structures up to 2 pointers in size by value, matching `ScalarPair`. LLVM ++ // will usually return these in 2 registers, which is more efficient than by-ref. ++ let max_by_val_size = if is_ret { Pointer.size(cx) * 2 } else { Pointer.size(cx) }; + let size = arg.layout.size; + + if arg.layout.is_unsized() || size > max_by_val_size { +@@ -2901,9 +2901,9 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) { + arg.cast_to(Reg { kind: RegKind::Integer, size }); + } + }; +- fixup(&mut self.ret); ++ fixup(&mut self.ret, true); + for arg in &mut self.args { +- fixup(arg); ++ fixup(arg, false); + } + return; + } +diff --git a/src/test/codegen/arg-return-value-in-reg.rs b/src/test/codegen/return-value-in-reg.rs +similarity index 74% +rename from src/test/codegen/arg-return-value-in-reg.rs +rename to src/test/codegen/return-value-in-reg.rs +index a69291d47821..4bc0136c5e32 100644 +--- a/src/test/codegen/arg-return-value-in-reg.rs ++++ b/src/test/codegen/return-value-in-reg.rs +@@ -1,4 +1,4 @@ +-//! Check that types of up to 128 bits are passed and returned by-value instead of via pointer. ++//! This test checks that types of up to 128 bits are returned by-value instead of via out-pointer. + + // compile-flags: -C no-prepopulate-passes -O + // only-x86_64 +@@ -11,7 +11,7 @@ pub struct S { + c: u32, + } + +-// CHECK: define i128 @modify(i128{{( %0)?}}) ++// CHECK: define i128 @modify(%S* noalias nocapture dereferenceable(16) %s) + #[no_mangle] + pub fn modify(s: S) -> S { + S { a: s.a + s.a, b: s.b + s.b, c: s.c + s.c } +diff --git a/src/test/codegen/union-abi.rs b/src/test/codegen/union-abi.rs +index f282fd237054..afea01e9a2d0 100644 +--- a/src/test/codegen/union-abi.rs ++++ b/src/test/codegen/union-abi.rs +@@ -63,16 +63,11 @@ pub union UnionU128{a:u128} + #[no_mangle] + pub fn test_UnionU128(_: UnionU128) -> UnionU128 { loop {} } + +-pub union UnionU128x2{a:(u128, u128)} +-// CHECK: define void @test_UnionU128x2(i128 %_1.0, i128 %_1.1) +-#[no_mangle] +-pub fn test_UnionU128x2(_: UnionU128x2) { loop {} } +- + #[repr(C)] +-pub union CUnionU128x2{a:(u128, u128)} +-// CHECK: define void @test_CUnionU128x2(%CUnionU128x2* {{.*}} %_1) ++pub union CUnionU128{a:u128} ++// CHECK: define void @test_CUnionU128(%CUnionU128* {{.*}} %_1) + #[no_mangle] +-pub fn test_CUnionU128x2(_: CUnionU128x2) { loop {} } ++pub fn test_CUnionU128(_: CUnionU128) { loop {} } + + pub union UnionBool { b:bool } + // CHECK: define zeroext i1 @test_UnionBool(i8 %b) +-- +2.29.2 + diff --git a/debian/patches/9756838f612da2ef6c359aaea8bf0a69ad76716a.patch b/debian/patches/9756838f612da2ef6c359aaea8bf0a69ad76716a.patch new file mode 100644 index 0000000000..896484db2f --- /dev/null +++ b/debian/patches/9756838f612da2ef6c359aaea8bf0a69ad76716a.patch @@ -0,0 +1,25 @@ +From 9756838f612da2ef6c359aaea8bf0a69ad76716a Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Mon, 11 Jan 2021 15:13:26 -0800 +Subject: [PATCH] differentiate functions in extern-compare-with-return-type.rs + +--- + src/test/ui/extern/extern-compare-with-return-type.rs | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/test/ui/extern/extern-compare-with-return-type.rs b/src/test/ui/extern/extern-compare-with-return-type.rs +index 6c9ed3760f6e4..52b51bb943aa6 100644 +--- a/src/test/ui/extern/extern-compare-with-return-type.rs ++++ b/src/test/ui/extern/extern-compare-with-return-type.rs +@@ -2,8 +2,9 @@ + // Tests that we can compare various kinds of extern fn signatures. + #![allow(non_camel_case_types)] + +-extern fn voidret1() {} +-extern fn voidret2() {} ++// `dbg!()` differentiates these functions to ensure they won't be merged. ++extern fn voidret1() { dbg!() } ++extern fn voidret2() { dbg!() } + + extern fn uintret() -> usize { 22 } + diff --git a/debian/patches/series b/debian/patches/series index 7c7d2483cc..7d049e6930 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,8 @@ # Patches for upstream # pending, or forwarded +9756838f612da2ef6c359aaea8bf0a69ad76716a.patch +0001-Revert-Auto-merge-of-79547.patch u-ignore-gdb-10-failures.patch u-update-version-check.patch u-reproducible-build.patch diff --git a/debian/patches/u-ignore-asm-unsupported.patch b/debian/patches/u-ignore-asm-unsupported.patch new file mode 100644 index 0000000000..81b2170ee1 --- /dev/null +++ b/debian/patches/u-ignore-asm-unsupported.patch @@ -0,0 +1,34 @@ +Bug: https://github.com/rust-lang/rust/issues/84038 +--- a/src/test/ui/asm/naked-invalid-attr.rs ++++ b/src/test/ui/asm/naked-invalid-attr.rs +@@ -1,6 +1,10 @@ + // Checks that #[naked] attribute can be placed on function definitions only. + // + // ignore-wasm32 asm unsupported ++// ignore-powerpc64 asm unsupported ++// ignore-powerpc64le asm unsupported ++// ignore-s390x asm unsupported ++// ignore-sparc64 asm unsupported + #![feature(asm)] + #![feature(naked_functions)] + #![naked] //~ ERROR should be applied to a function definition +--- a/src/test/ui/feature-gates/feature-gate-naked_functions.rs ++++ b/src/test/ui/feature-gates/feature-gate-naked_functions.rs +@@ -1,3 +1,7 @@ ++// ignore-powerpc64 asm unsupported ++// ignore-powerpc64le asm unsupported ++// ignore-s390x asm unsupported ++// ignore-sparc64 asm unsupported + #![feature(asm)] + + #[naked] +--- a/src/test/ui/rfc-2091-track-caller/error-with-naked.rs ++++ b/src/test/ui/rfc-2091-track-caller/error-with-naked.rs +@@ -1,3 +1,7 @@ ++// ignore-powerpc64 asm unsupported ++// ignore-powerpc64le asm unsupported ++// ignore-s390x asm unsupported ++// ignore-sparc64 asm unsupported + #![feature(asm, naked_functions)] + + #[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]` From 78185ab9700356dfe632d77947e914695565b70a Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Fri, 9 Apr 2021 16:54:25 +0100 Subject: [PATCH 2/6] Release 1.50.0+dfsg1-1~exp2 to Debian experimental. --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c430169ab8..c92d9dcc2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -rustc (1.50.0+dfsg1-1~exp2) UNRELEASED; urgency=medium +rustc (1.50.0+dfsg1-1~exp2) experimental; urgency=medium * Fix tests, fix s390x breakage. - -- Ximin Luo Fri, 09 Apr 2021 16:53:52 +0100 + -- Ximin Luo Fri, 09 Apr 2021 16:54:20 +0100 rustc (1.50.0+dfsg1-1~exp1) experimental; urgency=medium From 2a300fcff0ced40b4665d23b20ddb6529b689572 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sun, 11 Apr 2021 13:52:35 +0100 Subject: [PATCH 3/6] Fix cross-compile to windows using same-version stage0 --- debian/changelog | 6 ++++ debian/patches/series | 2 ++ ...4aa90416668d8f6b4cbd449e2e1de20fb937.patch | 30 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 debian/patches/u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch diff --git a/debian/changelog b/debian/changelog index c92d9dcc2d..a9c2095edc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rustc (1.50.0+dfsg1-1~exp3) UNRELEASED; urgency=medium + + * Fix cross-compile to windows using same-version stage0. + + -- Ximin Luo Sun, 11 Apr 2021 13:50:59 +0100 + rustc (1.50.0+dfsg1-1~exp2) experimental; urgency=medium * Fix tests, fix s390x breakage. diff --git a/debian/patches/series b/debian/patches/series index 7d049e6930..172e519361 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,6 +3,8 @@ # pending, or forwarded 9756838f612da2ef6c359aaea8bf0a69ad76716a.patch 0001-Revert-Auto-merge-of-79547.patch +u-ignore-asm-unsupported.patch +u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch u-ignore-gdb-10-failures.patch u-update-version-check.patch u-reproducible-build.patch diff --git a/debian/patches/u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch b/debian/patches/u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch new file mode 100644 index 0000000000..cc9a99a0ce --- /dev/null +++ b/debian/patches/u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch @@ -0,0 +1,30 @@ +commit 8d504aa90416668d8f6b4cbd449e2e1de20fb937 +Bug: https://github.com/rust-lang/rust/issues/84057 +Author: Ximin Luo +Date: Sun Apr 11 13:47:58 2021 +0100 + + bootstrap: check local_rebuild before adding --cfg=bootstrap, closes #84057 + +diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs +index 8244c7710ab..f6f07a10842 100644 +--- a/src/bootstrap/compile.rs ++++ b/src/bootstrap/compile.rs +@@ -462,11 +462,14 @@ fn run(self, builder: &Builder<'_>) -> Vec<(PathBuf, DependencyType)> { + let dst_file = &dst_dir.join(file.to_string() + ".o"); + if !up_to_date(src_file, dst_file) { + let mut cmd = Command::new(&builder.initial_rustc); ++ cmd.env("RUSTC_BOOTSTRAP", "1"); ++ if !builder.local_rebuild { ++ // a local_rebuild compiler already has stage1 features ++ cmd.arg("--cfg") ++ .arg("bootstrap"); ++ } + builder.run( +- cmd.env("RUSTC_BOOTSTRAP", "1") +- .arg("--cfg") +- .arg("bootstrap") +- .arg("--target") ++ cmd.arg("--target") + .arg(target.rustc_target_arg()) + .arg("--emit=obj") + .arg("-o") From f18446037896bad458f8e9d8db25d0444b52fb92 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sun, 11 Apr 2021 13:52:46 +0100 Subject: [PATCH 4/6] Release 1.50.0+dfsg1-1~exp3 to Debian experimental. --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a9c2095edc..7075deae99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -rustc (1.50.0+dfsg1-1~exp3) UNRELEASED; urgency=medium +rustc (1.50.0+dfsg1-1~exp3) experimental; urgency=medium * Fix cross-compile to windows using same-version stage0. - -- Ximin Luo Sun, 11 Apr 2021 13:50:59 +0100 + -- Ximin Luo Sun, 11 Apr 2021 13:52:41 +0100 rustc (1.50.0+dfsg1-1~exp2) experimental; urgency=medium From 2a1338f7c7b9d4eeec8941f591e791e2795dfb33 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Mon, 12 Apr 2021 01:51:02 +0100 Subject: [PATCH 5/6] Fix more tests with a backported upstream PR --- debian/changelog | 6 + debian/patches/series | 2 +- debian/patches/u-84099.patch | 163 ++++++++++++++++++ debian/patches/u-ignore-asm-unsupported.patch | 34 ---- 4 files changed, 170 insertions(+), 35 deletions(-) create mode 100644 debian/patches/u-84099.patch delete mode 100644 debian/patches/u-ignore-asm-unsupported.patch diff --git a/debian/changelog b/debian/changelog index 7075deae99..8b94bb6131 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rustc (1.50.0+dfsg1-1~exp4) UNRELEASED; urgency=medium + + * Fix more tests with a backported upstream PR. + + -- Ximin Luo Mon, 12 Apr 2021 01:50:35 +0100 + rustc (1.50.0+dfsg1-1~exp3) experimental; urgency=medium * Fix cross-compile to windows using same-version stage0. diff --git a/debian/patches/series b/debian/patches/series index 172e519361..4c99d823f1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,7 +3,7 @@ # pending, or forwarded 9756838f612da2ef6c359aaea8bf0a69ad76716a.patch 0001-Revert-Auto-merge-of-79547.patch -u-ignore-asm-unsupported.patch +u-84099.patch u-8d504aa90416668d8f6b4cbd449e2e1de20fb937.patch u-ignore-gdb-10-failures.patch u-update-version-check.patch diff --git a/debian/patches/u-84099.patch b/debian/patches/u-84099.patch new file mode 100644 index 0000000000..24883c9a5e --- /dev/null +++ b/debian/patches/u-84099.patch @@ -0,0 +1,163 @@ +From 5e87f97de789d68719efafde6a0175d64ed90e3b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= +Date: Sun, 11 Apr 2021 00:00:00 +0000 +Subject: [PATCH] Check for asm support in UI tests that require it + +Add `needs-asm-support` compiletest directive, and use it in asm tests +that require asm support without relying on any architecture specific +features. +--- + src/test/ui/asm/bad-options.rs | 2 +- + src/test/ui/asm/naked-invalid-attr.rs | 2 +- + .../ui/feature-gates/feature-gate-naked_functions.rs | 1 + + .../feature-gates/feature-gate-naked_functions.stderr | 4 ++-- + src/test/ui/rfc-2091-track-caller/error-with-naked.rs | 1 + + .../ui/rfc-2091-track-caller/error-with-naked.stderr | 4 ++-- + src/tools/compiletest/src/header.rs | 5 +++++ + src/tools/compiletest/src/header/tests.rs | 11 +++++++++++ + src/tools/compiletest/src/util.rs | 9 +++++++++ + 9 files changed, 33 insertions(+), 6 deletions(-) + +diff --git a/src/test/ui/asm/bad-options.rs b/src/test/ui/asm/bad-options.rs +index 755fc2ca238aa..a60478f62154f 100644 +--- a/src/test/ui/asm/bad-options.rs ++++ b/src/test/ui/asm/bad-options.rs +@@ -1,4 +1,4 @@ +-// only-x86_64 ++// needs-asm-support + + #![feature(asm)] + +diff --git a/src/test/ui/asm/naked-invalid-attr.rs b/src/test/ui/asm/naked-invalid-attr.rs +index cdb6c17454b73..2576d1124c85c 100644 +--- a/src/test/ui/asm/naked-invalid-attr.rs ++++ b/src/test/ui/asm/naked-invalid-attr.rs +@@ -1,6 +1,6 @@ + // Checks that #[naked] attribute can be placed on function definitions only. + // +-// ignore-wasm32 asm unsupported ++// needs-asm-support + #![feature(asm)] + #![feature(naked_functions)] + #![naked] //~ ERROR should be applied to a function definition +diff --git a/src/test/ui/feature-gates/feature-gate-naked_functions.rs b/src/test/ui/feature-gates/feature-gate-naked_functions.rs +index 06bddc422cf80..71ca5b9373a68 100644 +--- a/src/test/ui/feature-gates/feature-gate-naked_functions.rs ++++ b/src/test/ui/feature-gates/feature-gate-naked_functions.rs +@@ -1,3 +1,4 @@ ++// needs-asm-support + #![feature(asm)] + + #[naked] +diff --git a/src/test/ui/feature-gates/feature-gate-naked_functions.stderr b/src/test/ui/feature-gates/feature-gate-naked_functions.stderr +index d95561d20133e..653d7b738da1a 100644 +--- a/src/test/ui/feature-gates/feature-gate-naked_functions.stderr ++++ b/src/test/ui/feature-gates/feature-gate-naked_functions.stderr +@@ -1,5 +1,5 @@ + error[E0658]: the `#[naked]` attribute is an experimental feature +- --> $DIR/feature-gate-naked_functions.rs:3:1 ++ --> $DIR/feature-gate-naked_functions.rs:4:1 + | + LL | #[naked] + | ^^^^^^^^ +@@ -8,7 +8,7 @@ LL | #[naked] + = help: add `#![feature(naked_functions)]` to the crate attributes to enable + + error[E0658]: the `#[naked]` attribute is an experimental feature +- --> $DIR/feature-gate-naked_functions.rs:9:1 ++ --> $DIR/feature-gate-naked_functions.rs:10:1 + | + LL | #[naked] + | ^^^^^^^^ +diff --git a/src/test/ui/rfc-2091-track-caller/error-with-naked.rs b/src/test/ui/rfc-2091-track-caller/error-with-naked.rs +index 70ec0e3033c6f..9464ffe872282 100644 +--- a/src/test/ui/rfc-2091-track-caller/error-with-naked.rs ++++ b/src/test/ui/rfc-2091-track-caller/error-with-naked.rs +@@ -1,3 +1,4 @@ ++// needs-asm-support + #![feature(asm, naked_functions)] + + #[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]` +diff --git a/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr b/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr +index 1b49148d629b2..5f17d6b2b5173 100644 +--- a/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr ++++ b/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr +@@ -1,11 +1,11 @@ + error[E0736]: cannot use `#[track_caller]` with `#[naked]` +- --> $DIR/error-with-naked.rs:3:1 ++ --> $DIR/error-with-naked.rs:4:1 + | + LL | #[track_caller] + | ^^^^^^^^^^^^^^^ + + error[E0736]: cannot use `#[track_caller]` with `#[naked]` +- --> $DIR/error-with-naked.rs:12:5 ++ --> $DIR/error-with-naked.rs:13:5 + | + LL | #[track_caller] + | ^^^^^^^^^^^^^^^ +diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs +index 531a23d76a27b..363105a9f09c0 100644 +--- a/src/tools/compiletest/src/header.rs ++++ b/src/tools/compiletest/src/header.rs +@@ -44,6 +44,7 @@ impl EarlyProps { + let mut props = EarlyProps::default(); + let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some(); + let rustc_has_sanitizer_support = env::var_os("RUSTC_SANITIZER_SUPPORT").is_some(); ++ let has_asm_support = util::has_asm_support(&config.target); + let has_asan = util::ASAN_SUPPORTED_TARGETS.contains(&&*config.target); + let has_lsan = util::LSAN_SUPPORTED_TARGETS.contains(&&*config.target); + let has_msan = util::MSAN_SUPPORTED_TARGETS.contains(&&*config.target); +@@ -76,6 +77,10 @@ impl EarlyProps { + props.ignore = true; + } + ++ if !has_asm_support && config.parse_name_directive(ln, "needs-asm-support") { ++ props.ignore = true; ++ } ++ + if !rustc_has_profiler_support && config.parse_needs_profiler_support(ln) { + props.ignore = true; + } +diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs +index ec99fde0df9c2..c41b43cdd0b53 100644 +--- a/src/tools/compiletest/src/header/tests.rs ++++ b/src/tools/compiletest/src/header/tests.rs +@@ -223,6 +223,17 @@ fn sanitizers() { + assert!(parse_rs(&config, "// needs-sanitizer-thread").ignore); + } + ++#[test] ++fn asm_support() { ++ let mut config = config(); ++ ++ config.target = "avr-unknown-gnu-atmega328".to_owned(); ++ assert!(parse_rs(&config, "// needs-asm-support").ignore); ++ ++ config.target = "i686-unknown-netbsd".to_owned(); ++ assert!(!parse_rs(&config, "// needs-asm-support").ignore); ++} ++ + #[test] + fn test_extract_version_range() { + use super::{extract_llvm_version, extract_version_range}; +diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs +index b302953708c18..7dbd70948b84d 100644 +--- a/src/tools/compiletest/src/util.rs ++++ b/src/tools/compiletest/src/util.rs +@@ -128,6 +128,15 @@ const BIG_ENDIAN: &[&str] = &[ + "sparcv9", + ]; + ++static ASM_SUPPORTED_ARCHS: &[&str] = &[ ++ "x86", "x86_64", "arm", "aarch64", "riscv32", "riscv64", "nvptx64", "hexagon", "mips", ++ "mips64", "spirv", "wasm32", ++]; ++ ++pub fn has_asm_support(triple: &str) -> bool { ++ ASM_SUPPORTED_ARCHS.contains(&get_arch(triple)) ++} ++ + pub fn matches_os(triple: &str, name: &str) -> bool { + // For the wasm32 bare target we ignore anything also ignored on emscripten + // and then we also recognize `wasm32-bare` as the os for the target diff --git a/debian/patches/u-ignore-asm-unsupported.patch b/debian/patches/u-ignore-asm-unsupported.patch deleted file mode 100644 index 81b2170ee1..0000000000 --- a/debian/patches/u-ignore-asm-unsupported.patch +++ /dev/null @@ -1,34 +0,0 @@ -Bug: https://github.com/rust-lang/rust/issues/84038 ---- a/src/test/ui/asm/naked-invalid-attr.rs -+++ b/src/test/ui/asm/naked-invalid-attr.rs -@@ -1,6 +1,10 @@ - // Checks that #[naked] attribute can be placed on function definitions only. - // - // ignore-wasm32 asm unsupported -+// ignore-powerpc64 asm unsupported -+// ignore-powerpc64le asm unsupported -+// ignore-s390x asm unsupported -+// ignore-sparc64 asm unsupported - #![feature(asm)] - #![feature(naked_functions)] - #![naked] //~ ERROR should be applied to a function definition ---- a/src/test/ui/feature-gates/feature-gate-naked_functions.rs -+++ b/src/test/ui/feature-gates/feature-gate-naked_functions.rs -@@ -1,3 +1,7 @@ -+// ignore-powerpc64 asm unsupported -+// ignore-powerpc64le asm unsupported -+// ignore-s390x asm unsupported -+// ignore-sparc64 asm unsupported - #![feature(asm)] - - #[naked] ---- a/src/test/ui/rfc-2091-track-caller/error-with-naked.rs -+++ b/src/test/ui/rfc-2091-track-caller/error-with-naked.rs -@@ -1,3 +1,7 @@ -+// ignore-powerpc64 asm unsupported -+// ignore-powerpc64le asm unsupported -+// ignore-s390x asm unsupported -+// ignore-sparc64 asm unsupported - #![feature(asm, naked_functions)] - - #[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]` From 21598d5cdcc383888ebca079fab318066ec2e968 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Mon, 12 Apr 2021 01:51:27 +0100 Subject: [PATCH 6/6] Release 1.50.0+dfsg1-1~exp4 to Debian experimental. --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8b94bb6131..0ff0f546f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -rustc (1.50.0+dfsg1-1~exp4) UNRELEASED; urgency=medium +rustc (1.50.0+dfsg1-1~exp4) experimental; urgency=medium * Fix more tests with a backported upstream PR. - -- Ximin Luo Mon, 12 Apr 2021 01:50:35 +0100 + -- Ximin Luo Mon, 12 Apr 2021 01:51:22 +0100 rustc (1.50.0+dfsg1-1~exp3) experimental; urgency=medium