diff options
author | Mikael Urankar <mikael@FreeBSD.org> | 2022-11-07 19:00:46 +0100 |
---|---|---|
committer | Mikael Urankar <mikael@FreeBSD.org> | 2022-11-17 08:06:13 +0100 |
commit | af39fba60871f5bec770ee76c5375c2915deb703 (patch) | |
tree | 17bf15aa819bb950ccfd7aff34ad56de6ccca0ad /lang/rust/files | |
parent | x11-themes/qogir-gtk-themes: update to 2022.11.09 (diff) |
lang/rust: Update to 1.65.0
Announce: https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html
ChangeLog: https://github.com/rust-lang/rust/releases/tag/1.65.0
PR: 267622
Reviewed by: tokib, pkubaj
Tested by: mikael, pkubaj
Diffstat (limited to 'lang/rust/files')
3 files changed, 29 insertions, 50 deletions
diff --git a/lang/rust/files/patch-vendor_cc-1.0.69_src_lib.rs b/lang/rust/files/patch-vendor_cc-1.0.69_src_lib.rs deleted file mode 100644 index 1027757e0c34..000000000000 --- a/lang/rust/files/patch-vendor_cc-1.0.69_src_lib.rs +++ /dev/null @@ -1,38 +0,0 @@ -When the compiler has "clang" in its name the cc crate will pass -an LLVM target triple to it. Rust uses a triple that lacks the OS -version and LLVM will default to FreeBSD 9 behavior, i.e., it will -default to libstdc++ which is no longer available in newer releases. - -To avoid this issue assume we have a GNU compatible toolchain instead -until LLVM can be updated to use libc++ by default. - -https://reviews.llvm.org/D77776 - ---- vendor/cc-1.0.69/src/lib.rs.orig 2021-03-04 20:58:54 UTC -+++ vendor/cc-1.0.69/src/lib.rs -@@ -2659,24 +2659,7 @@ impl Tool { - } - - fn with_features(path: PathBuf, clang_driver: Option<&str>, cuda: bool) -> Self { -- // Try to detect family of the tool from its name, falling back to Gnu. -- let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) { -- if fname.contains("clang-cl") { -- ToolFamily::Msvc { clang_cl: true } -- } else if fname.ends_with("cl") || fname == "cl.exe" { -- ToolFamily::Msvc { clang_cl: false } -- } else if fname.contains("clang") { -- match clang_driver { -- Some("cl") => ToolFamily::Msvc { clang_cl: true }, -- _ => ToolFamily::Clang, -- } -- } else { -- ToolFamily::Gnu -- } -- } else { -- ToolFamily::Gnu -- }; -- -+ let family = ToolFamily::Gnu; - Tool { - path: path, - cc_wrapper_path: None, diff --git a/lang/rust/files/powerpc/patch-compiler_rustc__llvm_build.rs b/lang/rust/files/powerpc/patch-compiler_rustc__llvm_build.rs new file mode 100644 index 000000000000..efe5542e0e1b --- /dev/null +++ b/lang/rust/files/powerpc/patch-compiler_rustc__llvm_build.rs @@ -0,0 +1,29 @@ +--- compiler/rustc_llvm/build.rs.orig 2022-11-15 08:26:08.366900000 +0100 ++++ compiler/rustc_llvm/build.rs 2022-11-15 08:29:07.101616000 +0100 +@@ -235,20 +235,18 @@ fn main() { + let mut cmd = Command::new(&llvm_config); + cmd.arg(llvm_link_arg).arg("--libs"); + +- if !is_crossed { ++ if target.starts_with("arm") ++ || target.starts_with("powerpc-") ++ { ++ println!("cargo:rustc-link-lib=atomic"); ++ println!("cargo:rustc-link-lib=z"); ++ } else if !is_crossed { + cmd.arg("--system-libs"); + } else if target.contains("windows-gnu") { + println!("cargo:rustc-link-lib=shell32"); + println!("cargo:rustc-link-lib=uuid"); + } else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") { + println!("cargo:rustc-link-lib=z"); +- } else if target.starts_with("arm") +- || target.starts_with("mips-") +- || target.starts_with("mipsel-") +- || target.starts_with("powerpc-") +- { +- // 32-bit targets need to link libatomic. +- println!("cargo:rustc-link-lib=atomic"); + } + cmd.args(&components); + diff --git a/lang/rust/files/riscv64/patch-vendor_cc-1.0.69_src_lib.rs b/lang/rust/files/riscv64/patch-vendor_cc-1.0.69_src_lib.rs deleted file mode 100644 index be6399810851..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_cc-1.0.69_src_lib.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/cc-1.0.69/src/lib.rs.orig 2021-10-18 11:05:53 UTC -+++ vendor/cc-1.0.69/src/lib.rs -@@ -1700,6 +1700,9 @@ impl Build { - if target.contains("linux") && arch.starts_with("64") { - cmd.args.push(("-march=rv64gc").into()); - cmd.args.push("-mabi=lp64d".into()); -+ } else if target.contains("freebsd") && arch.starts_with("64") { -+ cmd.args.push(("-march=rv64gc").into()); -+ cmd.args.push("-mabi=lp64d".into()); - } else if target.contains("linux") && arch.starts_with("32") { - cmd.args.push(("-march=rv32gc").into()); - cmd.args.push("-mabi=ilp32d".into()); |