summaryrefslogtreecommitdiff
path: root/lang/rust/patches
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2020-08-06 11:42:56 +0000
committerjperkin <jperkin@pkgsrc.org>2020-08-06 11:42:56 +0000
commit09b0a61d18e8c83de4ebf27f077d68822e77814c (patch)
tree28c482e3676f7a51a457c58f392ff35c72578e89 /lang/rust/patches
parent8dfbca76a4b4388cfbfc61d942a6df1186658b64 (diff)
downloadpkgsrc-09b0a61d18e8c83de4ebf27f077d68822e77814c.tar.gz
rust: Update to version 1.45.2.
While here clean up all pkglint warnings. Changes since 1.44.1: Version 1.45.2 (2020-08-03) ========================== * [Fix bindings in tuple struct patterns][74954] * [Fix track_caller integration with trait objects][74784] [74954]: https://github.com/rust-lang/rust/issues/74954 [74784]: https://github.com/rust-lang/rust/issues/74784 Version 1.45.1 (2020-07-30) ========================== * [Fix const propagation with references.][73613] * [rustfmt accepts rustfmt_skip in cfg_attr again.][73078] * [Avoid spurious implicit region bound.][74509] * [Install clippy on x.py install][74457] [73613]: https://github.com/rust-lang/rust/pull/73613 [73078]: https://github.com/rust-lang/rust/issues/73078 [74509]: https://github.com/rust-lang/rust/pull/74509 [74457]: https://github.com/rust-lang/rust/pull/74457 Version 1.45.0 (2020-07-16) ========================== Language -------- - [Out of range float to int conversions using `as` has been defined as a saturating conversion.][71269] This was previously undefined behaviour, but you can use the `{f64, f32}::to_int_unchecked` methods to continue using the current behaviour, which may be desirable in rare performance sensitive situations. - [`mem::Discriminant<T>` now uses `T`'s discriminant type instead of always using `u64`.][70705] - [Function like procedural macros can now be used in expression, pattern, and statement positions.][68717] This means you can now use a function-like procedural macro anywhere you can use a declarative (`macro_rules!`) macro. Compiler -------- - [You can now override individual target features through the `target-feature` flag.][72094] E.g. `-C target-feature=+avx2 -C target-feature=+fma` is now equivalent to `-C target-feature=+avx2,+fma`. - [Added the `force-unwind-tables` flag.][69984] This option allows rustc to always generate unwind tables regardless of panic strategy. - [Added the `embed-bitcode` flag.][71716] This codegen flag allows rustc to include LLVM bitcode into generated `rlib`s (this is on by default). - [Added the `tiny` value to the `code-model` codegen flag.][72397] - [Added tier 3 support\* for the `mipsel-sony-psp` target.][72062] - [Added tier 3 support for the `thumbv7a-uwp-windows-msvc` target.][72133] \* Refer to Rust's [platform support page][forge-platform-support] for more information on Rust's tiered platform support. Libraries --------- - [`net::{SocketAddr, SocketAddrV4, SocketAddrV6}` now implements `PartialOrd` and `Ord`.][72239] - [`proc_macro::TokenStream` now implements `Default`.][72234] - [You can now use `char` with `ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo}` to iterate over a range of codepoints.][72413] E.g. you can now write the following; ```rust for ch in 'a'..='z' { print!("{}", ch); } println!(); // Prints "abcdefghijklmnopqrstuvwxyz" ``` - [`OsString` now implements `FromStr`.][71662] - [The `saturating_neg` method as been added to all signed integer primitive types, and the `saturating_abs` method has been added for all integer primitive types.][71886] - [`Arc<T>`, `Rc<T>` now implement `From<Cow<'_, T>>`, and `Box` now implements `From<Cow>` when `T` is `[T: Copy]`, `str`, `CStr`, `OsStr`, or `Path`.][71447] - [`Box<[T]>` now implements `From<[T; N]>`.][71095] - [`BitOr` and `BitOrAssign` are implemented for all `NonZero` integer types.][69813] - [The `fetch_min`, and `fetch_max` methods have been added to all atomic integer types.][72324] - [The `fetch_update` method has been added to all atomic integer types.][71843] Stabilized APIs --------------- - [`Arc::as_ptr`] - [`BTreeMap::remove_entry`] - [`Rc::as_ptr`] - [`rc::Weak::as_ptr`] - [`rc::Weak::from_raw`] - [`rc::Weak::into_raw`] - [`str::strip_prefix`] - [`str::strip_suffix`] - [`sync::Weak::as_ptr`] - [`sync::Weak::from_raw`] - [`sync::Weak::into_raw`] - [`char::UNICODE_VERSION`] - [`Span::resolved_at`] - [`Span::located_at`] - [`Span::mixed_site`] - [`unix::process::CommandExt::arg0`] Cargo ----- Misc ---- - [Rustdoc now supports strikethrough text in Markdown.][71928] E.g. `~~outdated information~~` becomes "~~outdated information~~". - [Added an emoji to Rustdoc's deprecated API message.][72014] Compatibility Notes ------------------- - [Trying to self initialize a static value (that is creating a value using itself) is unsound and now causes a compile error.][71140] - [`{f32, f64}::powi` now returns a slightly different value on Windows.][73420] This is due to changes in LLVM's intrinsics which `{f32, f64}::powi` uses. - [Rustdoc's CLI's extra error exit codes have been removed.][71900] These were previously undocumented and not intended for public use. Rustdoc still provides a non-zero exit code on errors. Internals Only -------------- - [Make clippy a git subtree instead of a git submodule][70655] - [Unify the undo log of all snapshot types][69464] [73420]: https://github.com/rust-lang/rust/issues/73420/ [72324]: https://github.com/rust-lang/rust/pull/72324/ [71843]: https://github.com/rust-lang/rust/pull/71843/ [71886]: https://github.com/rust-lang/rust/pull/71886/ [72234]: https://github.com/rust-lang/rust/pull/72234/ [72239]: https://github.com/rust-lang/rust/pull/72239/ [72397]: https://github.com/rust-lang/rust/pull/72397/ [72413]: https://github.com/rust-lang/rust/pull/72413/ [72014]: https://github.com/rust-lang/rust/pull/72014/ [72062]: https://github.com/rust-lang/rust/pull/72062/ [72094]: https://github.com/rust-lang/rust/pull/72094/ [72133]: https://github.com/rust-lang/rust/pull/72133/ [71900]: https://github.com/rust-lang/rust/pull/71900/ [71928]: https://github.com/rust-lang/rust/pull/71928/ [71662]: https://github.com/rust-lang/rust/pull/71662/ [71716]: https://github.com/rust-lang/rust/pull/71716/ [71447]: https://github.com/rust-lang/rust/pull/71447/ [71269]: https://github.com/rust-lang/rust/pull/71269/ [71095]: https://github.com/rust-lang/rust/pull/71095/ [71140]: https://github.com/rust-lang/rust/pull/71140/ [70655]: https://github.com/rust-lang/rust/pull/70655/ [70705]: https://github.com/rust-lang/rust/pull/70705/ [69984]: https://github.com/rust-lang/rust/pull/69984/ [69813]: https://github.com/rust-lang/rust/pull/69813/ [69464]: https://github.com/rust-lang/rust/pull/69464/ [68717]: https://github.com/rust-lang/rust/pull/68717/ [`Arc::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.as_ptr [`BTreeMap::remove_entry`]: https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.remove_entry [`Rc::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.as_ptr [`rc::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.as_ptr [`rc::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.from_raw [`rc::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.into_raw [`sync::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.as_ptr [`sync::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.from_raw [`sync::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.into_raw [`str::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_prefix [`str::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_suffix [`char::UNICODE_VERSION`]: https://doc.rust-lang.org/stable/std/char/constant.UNICODE_VERSION.html [`Span::resolved_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.resolved_at [`Span::located_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.located_at [`Span::mixed_site`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.mixed_site [`unix::process::CommandExt::arg0`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.arg0
Diffstat (limited to 'lang/rust/patches')
-rw-r--r--lang/rust/patches/patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake10
-rw-r--r--lang/rust/patches/patch-vendor_libssh2-sys_libssh2_Makefile.am4
-rw-r--r--lang/rust/patches/patch-vendor_rand-0.6.1_src_rngs_os.rs (renamed from lang/rust/patches/patch-src_vendor_rand-0.6.1_src_rngs_os.rs)2
-rw-r--r--lang/rust/patches/patch-vendor_stacker_src_lib.rs15
-rw-r--r--lang/rust/patches/patch-vendor_tokio-uds_src_ucred.rs24
5 files changed, 48 insertions, 7 deletions
diff --git a/lang/rust/patches/patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake b/lang/rust/patches/patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake
index 067a467176c..5887cc47dec 100644
--- a/lang/rust/patches/patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake
+++ b/lang/rust/patches/patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake,v 1.2 2019/10/02 12:51:43 he Exp $
+$NetBSD: patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake,v 1.3 2020/08/06 11:42:56 jperkin Exp $
"-z discard-unused" is only supported by Oracle Solaris ld.
On Darwin, use correct install-name for shared libraries.
---- src/llvm-project/llvm/cmake/modules/AddLLVM.cmake.orig 2018-08-01 16:32:37.000000000 +0000
+--- src/llvm-project/llvm/cmake/modules/AddLLVM.cmake.orig 2020-05-20 18:10:32.000000000 +0000
+++ src/llvm-project/llvm/cmake/modules/AddLLVM.cmake
-@@ -223,8 +223,6 @@ function(add_link_opts target_name)
+@@ -234,8 +234,6 @@ function(add_link_opts target_name)
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-dead_strip")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
@@ -14,12 +14,12 @@ On Darwin, use correct install-name for shared libraries.
elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD AND
NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD|AIX")
# Object files are compiled with -ffunction-data-sections.
-@@ -1727,7 +1725,7 @@ function(llvm_setup_rpath name)
+@@ -1887,7 +1885,7 @@ function(llvm_setup_rpath name)
endif()
if (APPLE)
- set(_install_name_dir INSTALL_NAME_DIR "@rpath")
+ set(_install_name_dir INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
- set(_install_rpath "@loader_path/../lib" ${extra_libdir})
+ set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(UNIX)
set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
diff --git a/lang/rust/patches/patch-vendor_libssh2-sys_libssh2_Makefile.am b/lang/rust/patches/patch-vendor_libssh2-sys_libssh2_Makefile.am
index 4ba86586678..1a2bd3470d5 100644
--- a/lang/rust/patches/patch-vendor_libssh2-sys_libssh2_Makefile.am
+++ b/lang/rust/patches/patch-vendor_libssh2-sys_libssh2_Makefile.am
@@ -1,4 +1,6 @@
-$NetBSD: patch-vendor_libssh2-sys_libssh2_Makefile.am,v 1.1 2020/03/12 12:51:29 ryoon Exp $
+$NetBSD: patch-vendor_libssh2-sys_libssh2_Makefile.am,v 1.2 2020/08/06 11:42:56 jperkin Exp $
+
+Shell portability fix.
--- vendor/libssh2-sys/libssh2/Makefile.am.orig 2020-02-25 00:28:47.000000000 +0000
+++ vendor/libssh2-sys/libssh2/Makefile.am
diff --git a/lang/rust/patches/patch-src_vendor_rand-0.6.1_src_rngs_os.rs b/lang/rust/patches/patch-vendor_rand-0.6.1_src_rngs_os.rs
index 459e6b5cbba..0f2e6957336 100644
--- a/lang/rust/patches/patch-src_vendor_rand-0.6.1_src_rngs_os.rs
+++ b/lang/rust/patches/patch-vendor_rand-0.6.1_src_rngs_os.rs
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_vendor_rand-0.6.1_src_rngs_os.rs,v 1.1 2019/10/02 12:51:43 he Exp $
+$NetBSD: patch-vendor_rand-0.6.1_src_rngs_os.rs,v 1.1 2020/08/06 11:42:56 jperkin Exp $
-Explicitly disable getrandom support on SunOS, the test fails.
-https://github.com/rust-random/rand/issues/637
diff --git a/lang/rust/patches/patch-vendor_stacker_src_lib.rs b/lang/rust/patches/patch-vendor_stacker_src_lib.rs
new file mode 100644
index 00000000000..c875d3bffcc
--- /dev/null
+++ b/lang/rust/patches/patch-vendor_stacker_src_lib.rs
@@ -0,0 +1,15 @@
+$NetBSD: patch-vendor_stacker_src_lib.rs,v 1.1 2020/08/06 11:42:56 jperkin Exp $
+
+Avoid missing pthread_* on older SunOS.
+
+--- vendor/stacker/src/lib.rs.orig 2020-07-13 18:18:17.000000000 +0000
++++ vendor/stacker/src/lib.rs
+@@ -355,7 +355,7 @@ cfg_if! {
+ );
+ Some(mi.assume_init().AllocationBase as usize + get_thread_stack_guarantee() + 0x1000)
+ }
+- } else if #[cfg(any(target_os = "linux", target_os="solaris", target_os = "netbsd"))] {
++ } else if #[cfg(any(target_os = "linux", target_os = "netbsd"))] {
+ unsafe fn guess_os_stack_limit() -> Option<usize> {
+ let mut attr = std::mem::MaybeUninit::<libc::pthread_attr_t>::uninit();
+ assert_eq!(libc::pthread_attr_init(attr.as_mut_ptr()), 0);
diff --git a/lang/rust/patches/patch-vendor_tokio-uds_src_ucred.rs b/lang/rust/patches/patch-vendor_tokio-uds_src_ucred.rs
new file mode 100644
index 00000000000..1a6605be36c
--- /dev/null
+++ b/lang/rust/patches/patch-vendor_tokio-uds_src_ucred.rs
@@ -0,0 +1,24 @@
+$NetBSD: patch-vendor_tokio-uds_src_ucred.rs,v 1.1 2020/08/06 11:42:56 jperkin Exp $
+
+Support illumos.
+
+--- vendor/tokio-uds/src/ucred.rs.orig 2020-07-13 18:18:17.000000000 +0000
++++ vendor/tokio-uds/src/ucred.rs
+@@ -15,7 +15,7 @@ pub use self::impl_linux::get_peer_cred;
+ #[cfg(any(target_os = "dragonfly", target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))]
+ pub use self::impl_macos::get_peer_cred;
+
+-#[cfg(any(target_os = "solaris"))]
++#[cfg(any(target_os = "illumos", target_os = "solaris"))]
+ pub use self::impl_solaris::get_peer_cred;
+
+ #[cfg(any(target_os = "linux", target_os = "android"))]
+@@ -89,7 +89,7 @@ pub mod impl_macos {
+ }
+
+
+-#[cfg(any(target_os = "solaris"))]
++#[cfg(any(target_os = "illumos", target_os = "solaris"))]
+ pub mod impl_solaris {
+ use std::io;
+ use std::os::unix::io::AsRawFd;