pkgsrc-WIP-changes archive

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

rust: copy in backtrace function definitions from openbsd's mod.rs.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Thu May 12 22:07:46 2022 +0000
Changeset:	02befd3bc1182ffc10b8c911c730d160a4fe4caa

Modified Files:
	rust/Makefile
	rust/distinfo
	rust/do-cross.mk
Added Files:
	rust/patches/patch-vendor_libc-0.2.112_src_unix_bsd_netbsdlike_netbsd_mod.rs
	rust/patches/patch-vendor_libc-0.2.116_src_unix_bsd_netbsdlike_netbsd_mod.rs
	rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs

Log Message:
rust: copy in backtrace function definitions from openbsd's mod.rs.

It appears that only vendor/libc-0.2.116 is being used (it's the only
libc variant which needs it's checksum patched).

Also, allow a "local-roots.mk" override to do-cross.mk.

Bump PKGREVISION to 1.

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

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

diffstat:
 rust/Makefile                                      |  5 ++++
 rust/distinfo                                      |  3 +++
 rust/do-cross.mk                                   | 17 +++++++------
 ...c-0.2.112_src_unix_bsd_netbsdlike_netbsd_mod.rs | 29 ++++++++++++++++++++++
 ...c-0.2.116_src_unix_bsd_netbsdlike_netbsd_mod.rs | 29 ++++++++++++++++++++++
 ...ndor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs | 29 ++++++++++++++++++++++
 6 files changed, 105 insertions(+), 7 deletions(-)

diffs:
diff --git a/rust/Makefile b/rust/Makefile
index 6350c5e66b..77542a76c7 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -2,6 +2,7 @@
 
 DISTNAME=	rustc-1.60.0-src
 PKGNAME=	${DISTNAME:S/rustc/rust/:S/-src//}
+PKGREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	https://static.rust-lang.org/dist/
 
@@ -385,6 +386,10 @@ CKSUM_CRATES+=	vendor/cc-1.0.69
 CKSUMS+=	6dde684bdcc1bb03a808784ce8ccc0721f53bfdf87b84c607045aada916730ba
 CKSUMS+=	dd09a6ad92c998b3cc15d81b3b56a70544886fe0c22d659406aa25d734fe2fd1
 
+CKSUM_CRATES+=	vendor/libc-0.2.116
+CKSUMS+=	5f927d3d26165689b3ae7a7535ea5504068a406ef76705572c610995dbea1f0e
+CKSUMS+=	a8da54099bdddb92bd0150fd23b90a7d94216927297b7b24bee219e7e1f754e1
+
 #CKSUM_CRATES+=	vendor/rustc-ap-rustc_target
 #CKSUMS+=	5a8bae7d5b6feb07a75226ad061455298f05627086a3b444cb2a1a6272899d88
 #CKSUMS+=	673ac3b6875d487ace59b01725d83d2fab4af60615d1f8edd95bf21295947433
diff --git a/rust/distinfo b/rust/distinfo
index 6efc2a76f7..face623fd4 100644
--- a/rust/distinfo
+++ b/rust/distinfo
@@ -127,6 +127,9 @@ SHA1 (patch-src_tools_rls_rls_src_server_io.rs) = 5236eda97fa686b5661e4e5832102e
 SHA1 (patch-src_tools_rust-installer_install-template.sh) = ca769db07986ded26d92957e1055961895def546
 SHA1 (patch-vendor_cc-1.0.69_src_lib.rs) = b5c0f795624b928b8b02fe01174e6a24e770adea
 SHA1 (patch-vendor_cc_src_lib.rs) = 2f6b0ad800b31cd33334f194651981491ecf7641
+SHA1 (patch-vendor_libc-0.2.112_src_unix_bsd_netbsdlike_netbsd_mod.rs) = c4d703bc084d8506afd8fed1428f59e578936f77
+SHA1 (patch-vendor_libc-0.2.116_src_unix_bsd_netbsdlike_netbsd_mod.rs) = 90144e0a6a91db61c42308181a25bdf5ff60e670
+SHA1 (patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs) = 351e213fc07b0dc7c35d70d6a0c2ecc6b5b9056e
 SHA1 (patch-vendor_libc_src_unix_solarish_mod.rs) = 8364e19ea09203d32494c37ff3db19fe3d6b9d8a
 SHA1 (patch-vendor_lzma-sys_config.h) = b654c7e129fa02697734bc87173f89b3056a5437
 SHA1 (patch-vendor_openssl-src_src_lib.rs) = e62697daa7e7fa3d7b89f338c3a26066b93d7b34
diff --git a/rust/do-cross.mk b/rust/do-cross.mk
index 769c1da85d..2deb7a5f3e 100644
--- a/rust/do-cross.mk
+++ b/rust/do-cross.mk
@@ -11,15 +11,18 @@ SHORT_TARGETS+=	arm64
 SHORT_TARGETS+=	arm64_be
 SHORT_TARGETS+=	i386
 
+# Local overrides to ROOT.* variables:
+.sinclude "local-roots.mk"
+
 # Root of target directories.
 # Must have dest/ (build.sh's DESTDIR) and tools/ subdirectories
-ROOT.armv7=	/u/evbarm-armv7hf
-ROOT.sparc64=	/u/sparc64
-ROOT.powerpc=	/u/macppc
-ROOT.powerpc90=	/u/9.0-macppc
-ROOT.arm64=	/u/evbarm64
-ROOT.arm64_be=	/u/evbarm64eb
-ROOT.i386=	/u/i386
+ROOT.armv7?=	/u/evbarm-armv7hf
+ROOT.sparc64?=	/u/sparc64
+ROOT.powerpc?=	/u/macppc
+ROOT.powerpc90?=/u/9.0-macppc
+ROOT.arm64?=	/u/evbarm64
+ROOT.arm64_be?=	/u/evbarm64eb
+ROOT.i386?=	/u/i386
 
 # Mapping to GNU triple
 G_TGT.armv7=	armv7--netbsdelf-eabihf
diff --git a/rust/patches/patch-vendor_libc-0.2.112_src_unix_bsd_netbsdlike_netbsd_mod.rs b/rust/patches/patch-vendor_libc-0.2.112_src_unix_bsd_netbsdlike_netbsd_mod.rs
new file mode 100644
index 0000000000..24c8526ee9
--- /dev/null
+++ b/rust/patches/patch-vendor_libc-0.2.112_src_unix_bsd_netbsdlike_netbsd_mod.rs
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Copy execinfo function definitions from openbsd's mod.rs.
+
+--- vendor/libc-0.2.112/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig	2022-04-04 11:10:56.000000000 +0000
++++ vendor/libc-0.2.112/src/unix/bsd/netbsdlike/netbsd/mod.rs
+@@ -2721,6 +2721,22 @@ extern "C" {
+     pub fn kinfo_getvmmap(pid: ::pid_t, cntp: *mut ::size_t) -> *mut kinfo_vmentry;
+ }
+ 
++#[link(name = "execinfo")]
++extern "C" {
++    pub fn backtrace(addrlist: *mut *mut ::c_void, len: ::size_t) -> ::size_t;
++    pub fn backtrace_symbols(addrlist: *const *mut ::c_void, len: ::size_t) -> *mut *mut ::c_char;
++    pub fn backtrace_symbols_fd(
++        addrlist: *const *mut ::c_void,
++        len: ::size_t,
++        fd: ::c_int,
++    ) -> ::c_int;
++    pub fn backtrace_symbols_fmt(
++        addrlist: *const *mut ::c_void,
++        len: ::size_t,
++        fmt: *const ::c_char,
++    ) -> *mut *mut ::c_char;
++}
++
+ cfg_if! {
+     if #[cfg(target_arch = "aarch64")] {
+         mod aarch64;
diff --git a/rust/patches/patch-vendor_libc-0.2.116_src_unix_bsd_netbsdlike_netbsd_mod.rs b/rust/patches/patch-vendor_libc-0.2.116_src_unix_bsd_netbsdlike_netbsd_mod.rs
new file mode 100644
index 0000000000..0e3314d9da
--- /dev/null
+++ b/rust/patches/patch-vendor_libc-0.2.116_src_unix_bsd_netbsdlike_netbsd_mod.rs
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Copy execinfo function definitions from openbsd's mod.rs.
+
+--- vendor/libc-0.2.116/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig	2022-04-04 11:10:56.000000000 +0000
++++ vendor/libc-0.2.116/src/unix/bsd/netbsdlike/netbsd/mod.rs
+@@ -2787,6 +2787,22 @@ extern "C" {
+     pub fn kinfo_getvmmap(pid: ::pid_t, cntp: *mut ::size_t) -> *mut kinfo_vmentry;
+ }
+ 
++#[link(name = "execinfo")]
++extern "C" {
++    pub fn backtrace(addrlist: *mut *mut ::c_void, len: ::size_t) -> ::size_t;
++    pub fn backtrace_symbols(addrlist: *const *mut ::c_void, len: ::size_t) -> *mut *mut ::c_char;
++    pub fn backtrace_symbols_fd(
++        addrlist: *const *mut ::c_void,
++        len: ::size_t,
++        fd: ::c_int,
++    ) -> ::c_int;
++    pub fn backtrace_symbols_fmt(
++        addrlist: *const *mut ::c_void,
++        len: ::size_t,
++        fmt: *const ::c_char,
++    ) -> *mut *mut ::c_char;
++}
++
+ cfg_if! {
+     if #[cfg(target_arch = "aarch64")] {
+         mod aarch64;
diff --git a/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs b/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
new file mode 100644
index 0000000000..cd519f6261
--- /dev/null
+++ b/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Copy execinfo function definitions from openbsd's mod.rs.
+
+--- vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig	2022-05-10 20:59:35.217463943 +0000
++++ vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
+@@ -2787,6 +2787,22 @@ extern "C" {
+     pub fn kinfo_getvmmap(pid: ::pid_t, cntp: *mut ::size_t) -> *mut kinfo_vmentry;
+ }
+ 
++#[link(name = "execinfo")]
++extern "C" {
++    pub fn backtrace(addrlist: *mut *mut ::c_void, len: ::size_t) -> ::size_t;
++    pub fn backtrace_symbols(addrlist: *const *mut ::c_void, len: ::size_t) -> *mut *mut ::c_char;
++    pub fn backtrace_symbols_fd(
++        addrlist: *const *mut ::c_void,
++        len: ::size_t,
++        fd: ::c_int,
++    ) -> ::c_int;
++    pub fn backtrace_symbols_fmt(
++        addrlist: *const *mut ::c_void,
++        len: ::size_t,
++        fmt: *const ::c_char,
++    ) -> *mut *mut ::c_char;
++}
++
+ cfg_if! {
+     if #[cfg(target_arch = "aarch64")] {
+         mod aarch64;


Home | Main Index | Thread Index | Old Index