From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8BE1B158287 for ; Fri, 16 May 2025 09:23:29 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 6D71134380B for ; Fri, 16 May 2025 09:23:29 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 67A3411036D; Fri, 16 May 2025 09:23:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 5C14111036D for ; Fri, 16 May 2025 09:23:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 03231343770 for ; Fri, 16 May 2025 09:23:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9E224DA7 for ; Fri, 16 May 2025 09:23:26 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1747387332.67cbbd5b7eaabbc1570dcdd4627de4af30db43bd.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/files/1.86.0-znver.patch dev-lang/rust/rust-1.86.0-r1.ebuild X-VCS-Directories: dev-lang/rust/files/ dev-lang/rust/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 67cbbd5b7eaabbc1570dcdd4627de4af30db43bd X-VCS-Branch: master Date: Fri, 16 May 2025 09:23:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8b0d9ff6-cf4f-4e97-91d6-7a2afe688d81 X-Archives-Hash: b5f20f8987f2c6eaf90956260bbac71d commit: 67cbbd5b7eaabbc1570dcdd4627de4af30db43bd Author: Sam James gentoo org> AuthorDate: Fri May 16 09:22:12 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 16 09:22:12 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67cbbd5b dev-lang/rust: fix 1.86 build w/ RUSTFLAGS for znver* Closes: https://bugs.gentoo.org/953109 Signed-off-by: Sam James gentoo.org> dev-lang/rust/files/1.86.0-znver.patch | 186 +++++++++++++++++++++++++++++++++ dev-lang/rust/rust-1.86.0-r1.ebuild | 1 + 2 files changed, 187 insertions(+) diff --git a/dev-lang/rust/files/1.86.0-znver.patch b/dev-lang/rust/files/1.86.0-znver.patch new file mode 100644 index 000000000000..5b93a76e653c --- /dev/null +++ b/dev-lang/rust/files/1.86.0-znver.patch @@ -0,0 +1,186 @@ +https://github.com/rust-lang/rust/issues/138054 +https://bugs.gentoo.org/953109#c7 +diff --git a/library/portable-simd/crates/core_simd/src/lib.rs b/library/portable-simd/crates/core_simd/src/lib.rs +index 7f57847c9c234..717b882b64ba1 100644 +--- a/library/portable-simd/crates/core_simd/src/lib.rs ++++ b/library/portable-simd/crates/core_simd/src/lib.rs +@@ -35,7 +35,11 @@ + feature(stdarch_x86_avx512) + )] + #![warn(missing_docs, clippy::missing_inline_in_public_items)] // basically all items, really +-#![deny(unsafe_op_in_unsafe_fn, clippy::undocumented_unsafe_blocks)] ++#![deny( ++ unsafe_op_in_unsafe_fn, ++ unreachable_pub, ++ clippy::undocumented_unsafe_blocks ++)] + #![doc(test(attr(deny(warnings))))] + #![allow(internal_features)] + #![unstable(feature = "portable_simd", issue = "86656")] +diff --git a/library/portable-simd/crates/core_simd/src/masks/bitmask.rs b/library/portable-simd/crates/core_simd/src/masks/bitmask.rs +index db4312d5bf88a..8221d8f17e90e 100644 +--- a/library/portable-simd/crates/core_simd/src/masks/bitmask.rs ++++ b/library/portable-simd/crates/core_simd/src/masks/bitmask.rs +@@ -5,7 +5,7 @@ use core::marker::PhantomData; + + /// A mask where each lane is represented by a single bit. + #[repr(transparent)] +-pub struct Mask( ++pub(crate) struct Mask( + as SupportedLaneCount>::BitMask, + PhantomData, + ) +@@ -78,7 +78,7 @@ where + { + #[inline] + #[must_use = "method returns a new mask and does not mutate the original value"] +- pub fn splat(value: bool) -> Self { ++ pub(crate) fn splat(value: bool) -> Self { + let mut mask = as SupportedLaneCount>::BitMask::default(); + if value { + mask.as_mut().fill(u8::MAX) +@@ -93,12 +93,12 @@ where + + #[inline] + #[must_use = "method returns a new bool and does not mutate the original value"] +- pub unsafe fn test_unchecked(&self, lane: usize) -> bool { ++ pub(crate) unsafe fn test_unchecked(&self, lane: usize) -> bool { + (self.0.as_ref()[lane / 8] >> (lane % 8)) & 0x1 > 0 + } + + #[inline] +- pub unsafe fn set_unchecked(&mut self, lane: usize, value: bool) { ++ pub(crate) unsafe fn set_unchecked(&mut self, lane: usize, value: bool) { + unsafe { + self.0.as_mut()[lane / 8] ^= ((value ^ self.test_unchecked(lane)) as u8) << (lane % 8) + } +@@ -106,7 +106,7 @@ where + + #[inline] + #[must_use = "method returns a new vector and does not mutate the original value"] +- pub fn to_int(self) -> Simd { ++ pub(crate) fn to_int(self) -> Simd { + unsafe { + core::intrinsics::simd::simd_select_bitmask( + self.0, +@@ -118,19 +118,19 @@ where + + #[inline] + #[must_use = "method returns a new mask and does not mutate the original value"] +- pub unsafe fn from_int_unchecked(value: Simd) -> Self { ++ pub(crate) unsafe fn from_int_unchecked(value: Simd) -> Self { + unsafe { Self(core::intrinsics::simd::simd_bitmask(value), PhantomData) } + } + + #[inline] +- pub fn to_bitmask_integer(self) -> u64 { ++ pub(crate) fn to_bitmask_integer(self) -> u64 { + let mut bitmask = [0u8; 8]; + bitmask[..self.0.as_ref().len()].copy_from_slice(self.0.as_ref()); + u64::from_ne_bytes(bitmask) + } + + #[inline] +- pub fn from_bitmask_integer(bitmask: u64) -> Self { ++ pub(crate) fn from_bitmask_integer(bitmask: u64) -> Self { + let mut bytes = as SupportedLaneCount>::BitMask::default(); + let len = bytes.as_mut().len(); + bytes +@@ -141,7 +141,7 @@ where + + #[inline] + #[must_use = "method returns a new mask and does not mutate the original value"] +- pub fn convert(self) -> Mask ++ pub(crate) fn convert(self) -> Mask + where + U: MaskElement, + { +@@ -151,13 +151,13 @@ where + + #[inline] + #[must_use = "method returns a new bool and does not mutate the original value"] +- pub fn any(self) -> bool { ++ pub(crate) fn any(self) -> bool { + self != Self::splat(false) + } + + #[inline] + #[must_use = "method returns a new bool and does not mutate the original value"] +- pub fn all(self) -> bool { ++ pub(crate) fn all(self) -> bool { + self == Self::splat(true) + } + } +diff --git a/library/portable-simd/crates/core_simd/src/masks/full_masks.rs b/library/portable-simd/crates/core_simd/src/masks/full_masks.rs +index ae55cf1f8fa87..a693ea90b9cb8 100644 +--- a/library/portable-simd/crates/core_simd/src/masks/full_masks.rs ++++ b/library/portable-simd/crates/core_simd/src/masks/full_masks.rs +@@ -3,7 +3,7 @@ + use crate::simd::{LaneCount, MaskElement, Simd, SupportedLaneCount}; + + #[repr(transparent)] +-pub struct Mask(Simd) ++pub(crate) struct Mask(Simd) + where + T: MaskElement, + LaneCount: SupportedLaneCount; +@@ -103,36 +103,36 @@ where + { + #[inline] + #[must_use = "method returns a new mask and does not mutate the original value"] +- pub fn splat(value: bool) -> Self { ++ pub(crate) fn splat(value: bool) -> Self { + Self(Simd::splat(if value { T::TRUE } else { T::FALSE })) + } + + #[inline] + #[must_use = "method returns a new bool and does not mutate the original value"] +- pub unsafe fn test_unchecked(&self, lane: usize) -> bool { ++ pub(crate) unsafe fn test_unchecked(&self, lane: usize) -> bool { + T::eq(self.0[lane], T::TRUE) + } + + #[inline] +- pub unsafe fn set_unchecked(&mut self, lane: usize, value: bool) { ++ pub(crate) unsafe fn set_unchecked(&mut self, lane: usize, value: bool) { + self.0[lane] = if value { T::TRUE } else { T::FALSE } + } + + #[inline] + #[must_use = "method returns a new vector and does not mutate the original value"] +- pub fn to_int(self) -> Simd { ++ pub(crate) fn to_int(self) -> Simd { + self.0 + } + + #[inline] + #[must_use = "method returns a new mask and does not mutate the original value"] +- pub unsafe fn from_int_unchecked(value: Simd) -> Self { ++ pub(crate) unsafe fn from_int_unchecked(value: Simd) -> Self { + Self(value) + } + + #[inline] + #[must_use = "method returns a new mask and does not mutate the original value"] +- pub fn convert(self) -> Mask ++ pub(crate) fn convert(self) -> Mask + where + U: MaskElement, + { +@@ -221,14 +221,14 @@ where + + #[inline] + #[must_use = "method returns a new bool and does not mutate the original value"] +- pub fn any(self) -> bool { ++ pub(crate) fn any(self) -> bool { + // Safety: use `self` as an integer vector + unsafe { core::intrinsics::simd::simd_reduce_any(self.to_int()) } + } + + #[inline] + #[must_use = "method returns a new bool and does not mutate the original value"] +- pub fn all(self) -> bool { ++ pub(crate) fn all(self) -> bool { + // Safety: use `self` as an integer vector + unsafe { core::intrinsics::simd::simd_reduce_all(self.to_int()) } + } diff --git a/dev-lang/rust/rust-1.86.0-r1.ebuild b/dev-lang/rust/rust-1.86.0-r1.ebuild index 3604d73a750e..7c23f41ec51d 100644 --- a/dev-lang/rust/rust-1.86.0-r1.ebuild +++ b/dev-lang/rust/rust-1.86.0-r1.ebuild @@ -175,6 +175,7 @@ PATCHES=( "${FILESDIR}"/1.85.0-cross-compile-libz.patch "${FILESDIR}"/1.85.0-musl-dynamic-linking.patch "${FILESDIR}"/1.67.0-doc-wasm.patch + "${FILESDIR}"/1.86.0-znver.patch ) clear_vendor_checksums() {