Skip to content
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

rust: update to 1.65.0 #13921

Merged
merged 4 commits into from
Nov 7, 2022
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
20 changes: 10 additions & 10 deletions mingw-w64-rust/0007-clang-subsystem.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -urN rustc-1.64.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs.orig rustc-1.64.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs
--- rustc-1.64.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs.orig 2022-09-19 16:07:21.000000000 +0200
+++ rustc-1.64.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs 2022-09-22 21:23:00.763734800 +0200
@@ -23,30 +23,10 @@
diff -urN rustc-1.65.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs.orig rustc-1.65.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs
--- rustc-1.65.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs.orig 2022-11-02 15:36:24.000000000 +0100
+++ rustc-1.65.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs 2022-11-04 14:02:11.995756500 +0100
@@ -24,30 +24,10 @@
],
);

Expand Down Expand Up @@ -33,7 +33,7 @@ diff -urN rustc-1.64.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs.or
let mut late_link_args_dynamic =
TargetOptions::link_args(LinkerFlavor::Ld, dynamic_unwind_libs);
super::add_link_args(&mut late_link_args_dynamic, LinkerFlavor::Gcc, dynamic_unwind_libs);
@@ -55,7 +35,7 @@
@@ -56,7 +36,7 @@
// binaries to be redistributed without the libgcc_s-dw2-1.dll
// dependency, but unfortunately break unwinding across DLL
// boundaries when unwinding across FFI boundaries.
Expand All @@ -42,7 +42,7 @@ diff -urN rustc-1.64.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs.or
let mut late_link_args_static = TargetOptions::link_args(LinkerFlavor::Ld, static_unwind_libs);
super::add_link_args(&mut late_link_args_static, LinkerFlavor::Gcc, static_unwind_libs);

@@ -64,7 +44,8 @@
@@ -65,7 +45,8 @@
env: "gnu".into(),
vendor: "pc".into(),
// FIXME(#13846) this should be enabled for windows
Expand All @@ -52,10 +52,10 @@ diff -urN rustc-1.64.0-src/compiler/rustc_target/src/spec/windows_gnu_base.rs.or
linker: Some("gcc".into()),
dynamic_linking: true,
dll_prefix: "".into(),
@@ -79,7 +60,6 @@
pre_link_objects_fallback: crt_objects::pre_mingw_fallback(),
post_link_objects_fallback: crt_objects::post_mingw_fallback(),
crt_objects_fallback: Some(CrtObjectsFallback::Mingw),
@@ -80,7 +61,6 @@
pre_link_objects_self_contained: crt_objects::pre_mingw_self_contained(),
post_link_objects_self_contained: crt_objects::post_mingw_self_contained(),
link_self_contained: LinkSelfContainedDefault::Mingw,
- late_link_args,
late_link_args_dynamic,
late_link_args_static,
Expand Down
12 changes: 6 additions & 6 deletions mingw-w64-rust/0008-disable-self-contained.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- rustc-1.53.0-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2021-07-04 01:49:38.816000000 +0200
+++ rustc-1.53.0-src/compiler/rustc_codegen_ssa/src/back/link.rs 2021-07-04 12:45:55.559928800 +0200
@@ -1420,7 +1420,10 @@

/// Whether we link to our own CRT objects instead of relying on gcc to pull them.
--- rustc-1.65.0-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2022-11-02 15:36:24.000000000 +0100
+++ rustc-1.65.0-src/compiler/rustc_codegen_ssa/src/back/link.rs 2022-11-04 16:02:23.846112700 +0100
@@ -1573,7 +1573,10 @@
/// Various toolchain components used during linking are used from rustc distribution
/// instead of being found somewhere on the host system.
/// We only provide such support for a very limited number of targets.
+#[allow(warnings)]
fn crt_objects_fallback(sess: &Session, crate_type: CrateType) -> bool {
fn self_contained(sess: &Session, crate_type: CrateType) -> bool {
+ return false;
+
if let Some(self_contained) = sess.opts.cg.link_self_contained {
Expand Down
25 changes: 11 additions & 14 deletions mingw-w64-rust/0009-build-gnullvm-targets-natively.patch
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ diff -urN rustc-1.64.0-src.orig/compiler/rustc_llvm/src/lib.rs rustc-1.64.0-src/
llvm_component = "mips",
LLVMInitializeMipsTargetInfo,
LLVMInitializeMipsTarget,
diff -urN rustc-1.64.0-src.orig/library/panic_unwind/src/gcc.rs rustc-1.64.0-src/library/panic_unwind/src/gcc.rs
--- rustc-1.64.0-src.orig/library/panic_unwind/src/gcc.rs 2022-10-08 13:17:05.170273500 +0200
+++ rustc-1.64.0-src/library/panic_unwind/src/gcc.rs 2022-10-08 13:24:03.627189600 +0200
@@ -263,7 +263,7 @@
--- rustc-1.65.0-src/library/std/src/personality/gcc.rs.orig 2022-11-02 15:36:24.000000000 +0100
+++ rustc-1.65.0-src/library/std/src/personality/gcc.rs 2022-11-05 00:52:51.424924700 +0100
@@ -219,7 +219,7 @@
}

cfg_if::cfg_if! {
Expand Down Expand Up @@ -87,28 +86,26 @@ diff -urN rustc-1.64.0-src.orig/src/bootstrap/compile.rs rustc-1.64.0-src/src/bo
|| builder.config.llvm_libunwind(target) == LlvmLibunwind::InTree
&& (target.contains("linux") || target.contains("fuchsia"))
{
diff -urN rustc-1.64.0-src.orig/src/stage0.json rustc-1.64.0-src/src/stage0.json
--- rustc-1.64.0-src.orig/src/stage0.json 2022-10-08 13:18:40.312158900 +0200
+++ rustc-1.64.0-src/src/stage0.json 2022-10-09 12:52:31.832896300 +0200
@@ -18,11 +18,16 @@
--- rustc-1.65.0-src/src/stage0.json.orig 2022-11-05 00:44:34.327573300 +0100
+++ rustc-1.65.0-src/src/stage0.json 2022-11-05 00:47:26.843070500 +0100
@@ -18,10 +18,16 @@
],
"compiler": {
"date": "2022-08-11",
- "version": "1.63.0"
"date": "2022-09-22",
- "version": "1.64.0"
+ "version": "1.63.0-dev"
},
"rustfmt": null,
"checksums_sha256": {
- "dist/2022-08-11/cargo-1.63.0-aarch64-apple-darwin.tar.gz": "4ae53dd1a0c059ba4a02a728c9250c785e39bd4f51550e2d3040e96457db4731",
+ "dist/2022-08-11/cargo-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz": "5a72ff6d89277c96f72cb7de7f35c4a3b4686b3dc6ea0d4966883e83179db0a8",
+ "dist/2022-08-11/rust-std-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz": "0a5087acf06faa2a02ff7f41afb7be42b22575a2ff0b3f790b6bb64418f3ea5d",
+ "dist/2022-08-11/rustc-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz": "96c7877b4821fe7bb4aaa35aa8f2056d19d622902d6583d0aef8a35f3fef8dbb",
+ "dist/2022-08-11/cargo-1.63.0-dev-x86_64-pc-windows-gnullvm.tar.xz": "71630672ae7964548b0662602ab4457d03016f69dccc5ed61975be395f07eb4e",
+ "dist/2022-08-11/rust-std-1.63.0-dev-x86_64-pc-windows-gnullvm.tar.xz": "3be870b47a8e5eebb581ba7044b05880bf618d8312364fa65b5fade7a0e80fa3",
+ "dist/2022-08-11/rustc-1.63.0-dev-x86_64-pc-windows-gnullvm.tar.xz": "ac78352d487641b0367e7b601f53b0497d1fd9f1a90cbad480d8bb5eafe85b4e",
"dist/2022-08-11/cargo-1.63.0-aarch64-apple-darwin.tar.xz": "fc9eb10567ad9b477180d40669c4e6f8edc48f54083689f4a0b4a49db1815b37",
"dist/2022-08-11/cargo-1.63.0-aarch64-pc-windows-msvc.tar.gz": "8015f61613ff5540a62e1aa405f2f1af574530bd5d16d2dedd9c25db895cb42e",
"dist/2022-08-11/cargo-1.63.0-aarch64-pc-windows-msvc.tar.xz": "7709efc6ef885a5e3922ed4769da78b48db13742a0ff178112b0a00193444b41",
"dist/2022-09-22/cargo-1.64.0-aarch64-apple-darwin.tar.gz": "dbb26b73baefc8351a7024f307445758fe1e9c18d83000358c02b80a5b1003b3",
"dist/2022-09-22/cargo-1.64.0-aarch64-apple-darwin.tar.xz": "8d987d76039b730086ee303710d93f3ff2abcfe3cb74505d8e68c9f72edaa812",
"dist/2022-09-22/cargo-1.64.0-aarch64-pc-windows-msvc.tar.gz": "6b86e2b51fa4471358e128369baff21a216815e90eb3ff70af7271e64438da0a",
diff -urN rustc-1.64.0-src.orig/src/test/run-make-fulldeps/reproducible-build/Makefile rustc-1.64.0-src/src/test/run-make-fulldeps/reproducible-build/Makefile
--- rustc-1.64.0-src.orig/src/test/run-make-fulldeps/reproducible-build/Makefile 2022-10-08 13:19:11.261819200 +0200
+++ rustc-1.64.0-src/src/test/run-make-fulldeps/reproducible-build/Makefile 2022-10-09 21:34:41.340559100 +0200
Expand Down
21 changes: 21 additions & 0 deletions mingw-w64-rust/0010-gnullvm-debuginfo-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- rustc-1.65.0-src/compiler/rustc_target/src/spec/windows_gnullvm_base.rs.orig 2022-11-02 14:36:24.000000000 +0000
+++ rustc-1.65.0-src/compiler/rustc_target/src/spec/windows_gnullvm_base.rs 2022-11-05 20:16:01.345559900 +0000
@@ -1,4 +1,5 @@
-use crate::spec::{cvs, LinkerFlavor, TargetOptions};
+use crate::spec::{cvs, DebuginfoKind, LinkerFlavor, SplitDebuginfo, TargetOptions};
+use std::borrow::Cow;

pub fn opts() -> TargetOptions {
// We cannot use `-nodefaultlibs` because compiler-rt has to be passed
@@ -34,7 +35,10 @@
eh_frame_header: false,
no_default_libraries: false,
has_thread_local: true,
-
+ // FIXME(davidtwco): Support Split DWARF on Windows GNU - may require LLVM changes to
+ // output DWO, despite using DWARF, doesn't use ELF..
+ debuginfo_kind: DebuginfoKind::Pdb,
+ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
..Default::default()
}
}
48 changes: 29 additions & 19 deletions mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@

_realname=rust
_bootstrapping=yes
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_bootstrapping=no
fi
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-rust-docs")
pkgver=1.64.0
pkgrel=2
pkgver=1.65.0
pkgrel=1
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand Down Expand Up @@ -37,30 +40,34 @@ source=("https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz"{,
"0005-win32-config.patch"
"0007-clang-subsystem.patch"
"0008-disable-self-contained.patch"
"0009-build-gnullvm-targets-natively.patch")
sha256sums=('b3cd9f481e1a2901bf6f3808d30c69cc4ea80d93c4cc4e2ed52258b180381205'
"0009-build-gnullvm-targets-natively.patch"
"0010-gnullvm-debuginfo-fix.patch")
sha256sums=('5828bb67f677eabf8c384020582b0ce7af884e1c84389484f7f8d00dd82c0038'
'SKIP'
'7cb1773c288ffb1c1e751edc49b1890c84bf9c362742bc5225d19d474edb73a0'
'36c531c73a2c12b3e66aa22526a404c3f770f1ab7e0e76c55af6fcc1a17e46fe'
'c4e5ffeef84296d39c3e3e8f807fc8b33ce786b1e4edb21eef26b053586aca27'
'c38450682a48bb1d5a0ddaa37ae5b324d39a9e0626daa2fc695caec1a53d6c35'
'29f84cb8e05ce304e102e28912a3b4464add406a8ec37a6c6d717b9b7d81b67b'
'c70cb2bceafdd5b0e7d9d58c52a4f5dcff3d639ac57b134a29961d377a97e457')
'aa847d81e733543dd8a242f957b7acf39b013952eeee6f0bf7c0f543be1328c4'
'a214cd8394ab7416fd170c7fa05daf701a5357d38e4e54149370e6efff208e50'
'b0a593a1a954dc51cd214e6ac5aabd2d88922202944eaceb7dd077d78d6dae3a'
'9c16adfddded1aac5ed812d82768dbe625614162639c05d63a0845e37e74fa0e')
validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag and Release Signing Key) <[email protected]>
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <[email protected]>
'B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <[email protected]>

# hack the bootstrap
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
source+=("https://github.com/mati865/rust-gnullvm-builds/releases/download/1.63.0-v2/cargo-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz"
"https://github.com/mati865/rust-gnullvm-builds/releases/download/1.63.0-v2/rust-std-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz"
"https://github.com/mati865/rust-gnullvm-builds/releases/download/1.63.0-v2/rustc-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz")
_stage0date="2022-08-11"
_stage0version="1.63.0"
if [[ $_bootstrapping != "no" && $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
source+=("https://github.com/mati865/rust-gnullvm-builds/releases/download/${_stage0version}-v2/cargo-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz"
"https://github.com/mati865/rust-gnullvm-builds/releases/download/${_stage0version}-v2/rust-std-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz"
"https://github.com/mati865/rust-gnullvm-builds/releases/download/${_stage0version}-v2/rustc-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz")
sha256sums+=('5a72ff6d89277c96f72cb7de7f35c4a3b4686b3dc6ea0d4966883e83179db0a8'
'0a5087acf06faa2a02ff7f41afb7be42b22575a2ff0b3f790b6bb64418f3ea5d'
'96c7877b4821fe7bb4aaa35aa8f2056d19d622902d6583d0aef8a35f3fef8dbb')
noextract+=('cargo-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz'
'rust-std-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz'
'rustc-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz')
noextract+=("cargo-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz"
"rust-std-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz"
"rustc-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz")
fi

# =========================================== #
Expand All @@ -83,7 +90,8 @@ prepare() {
0001-rustc-llvm-fix-libs.patch \
0004-unbundle-gcc.patch \
0005-win32-config.patch \
0008-disable-self-contained.patch
0008-disable-self-contained.patch \
0010-gnullvm-debuginfo-fix.patch

if [[ $MINGW_PACKAGE_PREFIX == *-clang-x86_64 ]]; then
apply_patch_with_msg \
Expand All @@ -110,10 +118,12 @@ build() {
fi

# hack to inject the bootstrap compiler
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
local rustdate="2022-08-11"
mkdir -p "build/cache/${rustdate}/"
cp -f "${srcdir}/cargo-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz" "${srcdir}/rust-std-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz" "${srcdir}/rustc-1.63.0-dev-aarch64-pc-windows-gnullvm.tar.xz" "build/cache/${rustdate}/"
if [[ $_bootstrapping != "no" && $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
mkdir -p "build/cache/${_stage0date}/"
cp -f "${srcdir}/cargo-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz" \
"${srcdir}/rust-std-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz" \
"${srcdir}/rustc-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz" \
"build/cache/${_stage0date}/"
fi

if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
Expand Down