diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-01-31 16:49:25 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-02-05 09:40:37 -0500 |
commit | 87144b17f8f77cfe2bff8dee07666617692ac527 (patch) | |
tree | 5bbd5518d98c9bfc8f778784497b20e0df9ded97 /gnu/packages/patches | |
parent | 39e67ed697951db0c75b0ba76269ca54108d9506 (diff) |
rust: Cleanup commit to prepare for new bootstrap.
This commit is not atomic and is not functional by itself; this is done so to
make the next set of changes more comprehensible.
* gnu/packages/patches/rust-1.19-mrustc.patch: Delete file.
* gnu/packages/patches/rust-1.30-gdb-llvm.patch: Likewise.
* gnu/packages/patches/rust-bootstrap-stage0-test.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Un-register files.
* gnu/packages/rust.scm (mrustc): Delete variable.
(rust-1.19, rust-1.20, rust-1.21 rust-1.22, rust-1.23, rust-1.24)
(rust-1.25, rust-1.26, rust-1.27, rust-1.28, rust-1.29)
(rust-1.30): Delete variables.
(rust-1.31 through rust-1.49): Fix indentation and do other cosmetic changes.
(rust): Define as rust-1.49.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/rust-1.19-mrustc.patch | 28 | ||||
-rw-r--r-- | gnu/packages/patches/rust-1.30-gdb-llvm.patch | 89 | ||||
-rw-r--r-- | gnu/packages/patches/rust-bootstrap-stage0-test.patch | 55 |
3 files changed, 0 insertions, 172 deletions
diff --git a/gnu/packages/patches/rust-1.19-mrustc.patch b/gnu/packages/patches/rust-1.19-mrustc.patch deleted file mode 100644 index 261162172e..0000000000 --- a/gnu/packages/patches/rust-1.19-mrustc.patch +++ /dev/null @@ -1,28 +0,0 @@ -See https://github.com/thepowersgang/mrustc/archive/v0.8.0.tar.gz - ---- rustc-1.19.0-src-orig/src/libcore/intrinsics.rs -+++ rustc-1.19.0-src/src/libcore/intrinsics.rs -@@ -678,5 +678,9 @@ - pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize; - -+ /// Obtain the length of a slice pointer -+ #[cfg(rust_compiler="mrustc")] -+ pub fn mrustc_slice_len<T>(pointer: *const [T]) -> usize; -+ - /// Gets a static string slice containing the name of a type. - pub fn type_name<T: ?Sized>() -> &'static str; - ---- rustc-1.19.0-src-orig/src/libcore/slice/mod.rs -+++ rustc-1.19.0-src/src/libcore/slice/mod.rs -@@ -413,6 +413,8 @@ - #[inline] - fn len(&self) -> usize { -- unsafe { -- mem::transmute::<&[T], Repr<T>>(self).len -- } -+ #[cfg(not(rust_compiler="mrustc"))] -+ let rv = unsafe { mem::transmute::<&[T], Repr<T>>(self).len }; -+ #[cfg(rust_compiler="mrustc")] -+ let rv = unsafe { ::intrinsics::mrustc_slice_len(self) }; -+ rv - } diff --git a/gnu/packages/patches/rust-1.30-gdb-llvm.patch b/gnu/packages/patches/rust-1.30-gdb-llvm.patch deleted file mode 100644 index e8f0acc8b4..0000000000 --- a/gnu/packages/patches/rust-1.30-gdb-llvm.patch +++ /dev/null @@ -1,89 +0,0 @@ -Tweak some gdb tests which were broken during LLVM upgrades. -This has been subsequently fixed upstream in later rustc versions, -but still needed to bootstrap some earlier versions of the compiler. - -diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs ---- rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs 2019-02-04 12:49:34.055483896 -0800 -+++ rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs 2019-02-04 13:01:10.915950356 -0800 -@@ -18,15 +18,15 @@ - - // gdb-command:print *the_a_ref - // gdbg-check:$1 = TheA --// gdbr-check:$1 = borrowed_c_style_enum::ABC::TheA -+// gdbr-check:$1 = borrowed_c_style_enum::TheA - - // gdb-command:print *the_b_ref - // gdbg-check:$2 = TheB --// gdbr-check:$2 = borrowed_c_style_enum::ABC::TheB -+// gdbr-check:$2 = borrowed_c_style_enum::TheB - - // gdb-command:print *the_c_ref - // gdbg-check:$3 = TheC --// gdbr-check:$3 = borrowed_c_style_enum::ABC::TheC -+// gdbr-check:$3 = borrowed_c_style_enum::TheC - - - // === LLDB TESTS ================================================================================== -diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs ---- rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs 2019-02-04 12:49:34.051483727 -0800 -+++ rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs 2019-02-04 13:02:00.981997525 -0800 -@@ -19,31 +19,31 @@ - - // gdb-command:print tuple_interior_padding - // gdbg-check:$1 = {__0 = 0, __1 = OneHundred} --// gdbr-check:$1 = (0, c_style_enum_in_composite::AnEnum::OneHundred) -+// gdbr-check:$1 = (0, c_style_enum_in_composite::OneHundred) - - // gdb-command:print tuple_padding_at_end - // gdbg-check:$2 = {__0 = {__0 = 1, __1 = OneThousand}, __1 = 2} --// gdbr-check:$2 = ((1, c_style_enum_in_composite::AnEnum::OneThousand), 2) -+// gdbr-check:$2 = ((1, c_style_enum_in_composite::OneThousand), 2) - - // gdb-command:print tuple_different_enums - // gdbg-check:$3 = {__0 = OneThousand, __1 = MountainView, __2 = OneMillion, __3 = Vienna} --// gdbr-check:$3 = (c_style_enum_in_composite::AnEnum::OneThousand, c_style_enum_in_composite::AnotherEnum::MountainView, c_style_enum_in_composite::AnEnum::OneMillion, c_style_enum_in_composite::AnotherEnum::Vienna) -+// gdbr-check:$3 = (c_style_enum_in_composite::OneThousand, c_style_enum_in_composite::MountainView, c_style_enum_in_composite::OneMillion, c_style_enum_in_composite::Vienna) - - // gdb-command:print padded_struct - // gdbg-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5} --// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5} -+// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::OneMillion, c: 4, d: c_style_enum_in_composite::Toronto, e: 5} - - // gdb-command:print packed_struct - // gdbg-check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8} --// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8} -+// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::OneHundred, c: 7, d: c_style_enum_in_composite::Vienna, e: 8} - - // gdb-command:print non_padded_struct - // gdbg-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto} --// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::AnEnum::OneMillion, b: c_style_enum_in_composite::AnotherEnum::MountainView, c: c_style_enum_in_composite::AnEnum::OneThousand, d: c_style_enum_in_composite::AnotherEnum::Toronto} -+// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::OneMillion, b: c_style_enum_in_composite::MountainView, c: c_style_enum_in_composite::OneThousand, d: c_style_enum_in_composite::Toronto} - - // gdb-command:print struct_with_drop - // gdbg-check:$7 = {__0 = {a = OneHundred, b = Vienna}, __1 = 9} --// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna}, 9) -+// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::OneHundred, b: c_style_enum_in_composite::Vienna}, 9) - - // === LLDB TESTS ================================================================================== - -diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs ---- rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs 2019-02-04 12:49:34.043483393 -0800 -+++ rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs 2019-02-04 13:02:17.954691634 -0800 -@@ -27,15 +27,15 @@ - - // gdb-command: print c_style_enum1 - // gdbg-check:$3 = CStyleEnumVar1 --// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar1 -+// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar1 - - // gdb-command: print c_style_enum2 - // gdbg-check:$4 = CStyleEnumVar2 --// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar2 -+// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar2 - - // gdb-command: print c_style_enum3 - // gdbg-check:$5 = CStyleEnumVar3 --// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar3 -+// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar3 - - #![allow(dead_code, unused_variables)] diff --git a/gnu/packages/patches/rust-bootstrap-stage0-test.patch b/gnu/packages/patches/rust-bootstrap-stage0-test.patch deleted file mode 100644 index e8484903e5..0000000000 --- a/gnu/packages/patches/rust-bootstrap-stage0-test.patch +++ /dev/null @@ -1,55 +0,0 @@ -Bootstrap tests failed with local stage0 cargo and rustc -Backported changes from https://github.com/rust-lang/rust/pull/51977 - -From 0834d9d771e912f51deca6c25699e44734624546 Mon Sep 17 00:00:00 2001 -From: Nikolai Merinov <nikolai.merinov@member.fsf.org> -Date: Mon, 2 Jul 2018 01:45:35 +0500 -Subject: [PATCH] bootstrap: tests should use rustc from config.toml - -Tests should always use "rustc" and "cargo" from config.toml instead -of assuming that stage0 binaries was downloaded to build directory. ---- - src/bootstrap/bootstrap.py | 2 ++ - src/bootstrap/config.rs | 6 ++---- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py -index 487440becf..1701f7b83a 100644 ---- a/src/bootstrap/bootstrap.py -+++ b/src/bootstrap/bootstrap.py -@@ -788,6 +788,8 @@ def bootstrap(help_triggered): - env["BOOTSTRAP_PARENT_ID"] = str(os.getpid()) - env["BOOTSTRAP_PYTHON"] = sys.executable - env["BUILD_DIR"] = build.build_dir -+ env["CARGO"] = build.cargo() -+ env["RUSTC"] = build.rustc() - run(args, env=env, verbose=build.verbose) - - -diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index 6dd6291be2..d1a0deb583 100644 ---- a/src/bootstrap/config.rs -+++ b/src/bootstrap/config.rs -@@ -23,7 +23,6 @@ use std::cmp; - - use num_cpus; - use toml; --use util::exe; - use cache::{INTERNER, Interned}; - use flags::Flags; - pub use flags::Subcommand; -@@ -362,9 +361,8 @@ impl Config { - config.src = Config::path_from_python("SRC"); - config.out = Config::path_from_python("BUILD_DIR"); - -- let stage0_root = config.out.join(&config.build).join("stage0/bin"); -- config.initial_rustc = stage0_root.join(exe("rustc", &config.build)); -- config.initial_cargo = stage0_root.join(exe("cargo", &config.build)); -+ config.initial_rustc = Config::path_from_python("RUSTC"); -+ config.initial_cargo = Config::path_from_python("CARGO"); - - config - } --- -2.17.1 - |