pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rust192: transport the diff to the riscv64.rs file for the new libc crate.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Sun Dec 14 07:29:20 2025 +0000
Changeset:	e6f4dc7fc5aefc42653e78cebe20c465ddccea44

Modified Files:
	rust192/Makefile
	rust192/distinfo
Added Files:
	rust192/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_riscv64.rs

Log Message:
rust192: transport the diff to the riscv64.rs file for the new libc crate.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e6f4dc7fc5aefc42653e78cebe20c465ddccea44

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 rust192/Makefile                                   |  5 ++
 rust192/distinfo                                   |  1 +
 ...2.177_src_unix_bsd_netbsdlike_netbsd_riscv64.rs | 80 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)

diffs:
diff --git a/rust192/Makefile b/rust192/Makefile
index 7f05c0a852..ce0cec987b 100644
--- a/rust192/Makefile
+++ b/rust192/Makefile
@@ -515,6 +515,11 @@ CKSUM_CRATES+=	vendor/libc-0.2.175
 CKSUMS+=	efa1a156cff1ab2450439adbb3ab2113bed6b7de2205c99e9cba875aa2b1c153
 CKSUMS+=	a7287f4e6e63cbd2d28ad5665b6515eaab5098ef063ede73b14ed7c7a76732ee
 
+CKSUM_CRATES+=	vendor/libc-0.2.177
+# covered by libc-0.2.175
+#CKSUMS+=	efa1a156cff1ab2450439adbb3ab2113bed6b7de2205c99e9cba875aa2b1c153
+#CKSUMS+=	a7287f4e6e63cbd2d28ad5665b6515eaab5098ef063ede73b14ed7c7a76732ee
+
 CKSUM_CRATES+=	vendor/zerocopy-0.7.32
 CKSUMS+=	2f21f18a4ca1d4be2d997f037158cb21a7421b2ba2cc52f3e4c5f9410197ed27
 CKSUMS+=	abe079743c2b2dea5b2c42564f98741a5eb9e24ff019e01742ace5581e53c06f
diff --git a/rust192/distinfo b/rust192/distinfo
index 37da889ca7..fdf21afd6c 100644
--- a/rust192/distinfo
+++ b/rust192/distinfo
@@ -142,6 +142,7 @@ SHA1 (patch-vendor_libc-0.2.172_src_unix_bsd_netbsdlike_netbsd_riscv64.rs) = 312
 SHA1 (patch-vendor_libc-0.2.172_src_unix_solarish_mod.rs) = 9365cab6fd25dd077ed56f6105cde22a4a3356dd
 SHA1 (patch-vendor_libc-0.2.174_src_unix_bsd_netbsdlike_netbsd_riscv64.rs) = bcfaa5a86f5a5d837cc467dd5ac62434fcedc518
 SHA1 (patch-vendor_libc-0.2.175_src_unix_bsd_netbsdlike_netbsd_riscv64.rs) = 393f7a6ad565bf5ceaa03e12d7b5eecd9bef467a
+SHA1 (patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_riscv64.rs) = 2cb676288786a14ff90f44c700951a245bd9e27b
 SHA1 (patch-vendor_line-index-0.1.2_src_lib.rs) = 30aa5c82630ea0e8969abb527c11640712efba1e
 SHA1 (patch-vendor_lzma-sys-0.1.20_config.h) = 4849052ddb2f04f539fd7060fc1b43cc3acf99c4
 SHA1 (patch-vendor_memchr-2.7.4_src_arch_aarch64_memchr.rs) = 3e17e9f068afe5e812d10bf57fd3f6d4c21baf0b
diff --git a/rust192/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_riscv64.rs b/rust192/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_riscv64.rs
new file mode 100644
index 0000000000..9270848abc
--- /dev/null
+++ b/rust192/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_riscv64.rs
@@ -0,0 +1,80 @@
+$NetBSD$
+
+--- vendor/libc-0.2.177/src/unix/bsd/netbsdlike/netbsd/riscv64.rs.orig	2025-12-14 06:33:12.291690472 +0000
++++ vendor/libc-0.2.177/src/unix/bsd/netbsdlike/netbsd/riscv64.rs
+@@ -1,16 +1,16 @@
+-use PT_FIRSTMACH;
++use crate::PT_FIRSTMACH;
+ 
+ use crate::prelude::*;
+ 
+ pub type __greg_t = u64;
+ pub type __cpu_simple_lock_nv_t = c_int;
+ pub type __gregset = [__greg_t; _NGREG];
+-pub type __fregset = [__freg; _NFREG];
++pub type __fpregset = [__fpreg; _NFREG];
+ 
+ s! {
+     pub struct mcontext_t {
+         pub __gregs: __gregset,
+-        pub __fregs: __fpregset,
++        pub __fpregs: __fpregset,
+         __spare: [crate::__greg_t; 7],
+     }
+ }
+@@ -22,6 +22,55 @@ s_no_extra_traits! {
+     }
+ }
+ 
++cfg_if! {
++    if #[cfg(feature = "extra_traits")] {
++//      use ::self::fmt;
++//      use ::self::hash;
++        use core::marker::Copy;
++        use core::clone::Clone;
++        #[cfg(libc_union)]
++        impl PartialEq for __fpreg {
++            fn eq(&self, other: &__fpreg) -> bool {
++                unsafe {
++                    self.u_64 == other.u_64
++                        || self.u_d == other.u_d
++                }
++            }
++        }
++        #[cfg(libc_union)]
++        impl Eq for __fpreg {}
++        #[cfg(libc_union)]
++        impl ::fmt::Debug for __fpreg {
++            fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
++                unsafe {
++                    f.debug_struct("__fpreg")
++                        .field("u_u64", &self.u_64)
++                        .field("u_d", &self.u_d)
++                        .finish()
++                }
++            }
++        }
++        #[cfg(libc_union)]
++        impl ::hash::Hash for __fpreg {
++            fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
++                unsafe {
++                    self.u_64.hash(state);
++                    self.u_d.hash(state);
++                }
++            }
++        }
++        #[cfg(libc_union)]
++        impl ::Copy for __fpreg {}
++        #[cfg(libc_union)]
++        impl ::Clone for __fpreg {
++            fn clone(&self) -> __fpreg {
++                *self
++            }
++        }
++    }
++}
++
++
+ pub(crate) const _ALIGNBYTES: usize = size_of::<c_long>() - 1;
+ 
+ pub const PT_GETREGS: c_int = PT_FIRSTMACH + 0;


Home | Main Index | Thread Index | Old Index