pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust193: add un-finished bits to support NetBSD/m68k.
Module Name: pkgsrc-wip
Committed By: Havard Eidnes <he%NetBSD.org@localhost>
Pushed By: he
Date: Fri Mar 6 10:51:02 2026 +0000
Changeset: 22fc368ecc9d41ba24ea9f3f6ababbe522dcd249
Modified Files:
rust193/Makefile
rust193/cross.mk
rust193/distinfo
rust193/do-cross.mk
rust193/files/gcc-wrap
rust193/patches/patch-compiler_rustc__target_src_spec_mod.rs
rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_mod.rs
rust193/patches/patch-vendor_openssl-src-111.28.2+1.1.1w_src_lib.rs
rust193/patches/patch-vendor_openssl-src-300.5.0+3.5.0_src_lib.rs
rust193/patches/patch-vendor_openssl-src-300.5.4+3.5.4_src_lib.rs
Added Files:
rust193/patches/patch-compiler_rustc__target_src_spec_targets_m68k__unknown__netbsd.rs
rust193/patches/patch-src_bootstrap_src_core_sanity.rs
rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_m68k.rs
Log Message:
rust193: add un-finished bits to support NetBSD/m68k.
The current major hurdle is that LLVM appears to use 16-bit
relocations "all over the place", and that doesn't work for big
programs. I think this is the same problem as reported in
https://github.com/llvm/llvm-project/issues/181481
so eagerly awaiting the resolution of that issue.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=22fc368ecc9d41ba24ea9f3f6ababbe522dcd249
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rust193/Makefile | 6 ++--
rust193/cross.mk | 5 ++-
rust193/distinfo | 13 +++++---
rust193/do-cross.mk | 4 +++
rust193/files/gcc-wrap | 5 +++
.../patch-compiler_rustc__target_src_spec_mod.rs | 14 ++++++--
...arget_src_spec_targets_m68k__unknown__netbsd.rs | 38 ++++++++++++++++++++++
.../patches/patch-src_bootstrap_src_core_sanity.rs | 15 +++++++++
...-0.2.177_src_unix_bsd_netbsdlike_netbsd_m68k.rs | 17 ++++++++++
...c-0.2.177_src_unix_bsd_netbsdlike_netbsd_mod.rs | 14 +++++++-
...h-vendor_openssl-src-111.28.2+1.1.1w_src_lib.rs | 11 ++++---
...tch-vendor_openssl-src-300.5.0+3.5.0_src_lib.rs | 14 ++++++--
...tch-vendor_openssl-src-300.5.4+3.5.4_src_lib.rs | 14 ++++++--
13 files changed, 147 insertions(+), 23 deletions(-)
diffs:
diff --git a/rust193/Makefile b/rust193/Makefile
index fff255f8f3..a9a8015934 100644
--- a/rust193/Makefile
+++ b/rust193/Makefile
@@ -448,7 +448,7 @@ CKSUMS+= ead4bda23c322bde8c01e48d4cd19b70e7b7e473a56466218d279f88463ab466
CKSUM_CRATES+= vendor/openssl-src-300.5.0+3.5.0
CKSUMS+= 16c0b9fa70475cfb50ac21ad4ce049b494c45b3270fed386013785a28abb8d0a
-CKSUMS+= 6e30595035395b92291de1b59b6e7b3e19732f15a6012bfe0c239b62c8738225
+CKSUMS+= e2817c457afa7efc0f2ca62ce9dab5254eb5ddd9a5fd9e75bba2789be92c7b14
CKSUMS+= 6e62515e67910aea2f04b64c643aa2545732f9dd7bf0abf87d8accf8c2c1fb88
CKSUMS+= ccc5252660386fbfec2d66423f2dc87e6da74efd39ca0fcd7c7fd583056725c1
CKSUMS+= ac5501e7bff0f4384db0537307b362bf1bcb120d8b5859e5f08bd796e78feaea
@@ -456,7 +456,7 @@ CKSUMS+= 6d2c2831119e059d35e81a89b08195a29e325f68acfd86a3a7157ebf8e78182d
CKSUM_CRATES+= vendor/openssl-src-300.5.4+3.5.4
CKSUMS+= 33f1e78110293a8558ae997ed57e7aac72c5bfd47a241dc7f6e2ffa98b7a7137
-CKSUMS+= c2f9725d735ef641df5273f20102413fd42ef1aec44428689803af4d8d706b79
+CKSUMS+= 8e2d07f5df1a7d33361ab657cdd3742850139d3fa16f639e6d37da01946bbe14
# covered by 3.5.0:
#CKSUMS+= 6e62515e67910aea2f04b64c643aa2545732f9dd7bf0abf87d8accf8c2c1fb88
#CKSUMS+= ccc5252660386fbfec2d66423f2dc87e6da74efd39ca0fcd7c7fd583056725c1
@@ -528,7 +528,7 @@ CKSUM_CRATES+= vendor/libc-0.2.177
#CKSUMS+= efa1a156cff1ab2450439adbb3ab2113bed6b7de2205c99e9cba875aa2b1c153
#CKSUMS+= f446c996f00e4d15fd25461a30c767c05d083df9e047b0da497ce7c545acfa96
CKSUMS+= 461feb5dc8dddea353ab6d32519045bc9f16525a48449c93dc7148469d94c9c3
-CKSUMS+= 1e67f0a4b668858f9326d47c61e868b2a1293296353b7f43ef8487e572b89513
+CKSUMS+= 1cab8d313161004e10463c6fd37c0846b31dbb7ccd0dbb509dd4e3edd94dda5b
CKSUM_CRATES+= vendor/zerocopy-0.7.32
CKSUMS+= 2f21f18a4ca1d4be2d997f037158cb21a7421b2ba2cc52f3e4c5f9410197ed27
diff --git a/rust193/cross.mk b/rust193/cross.mk
index 26d79473fb..816bed847a 100644
--- a/rust193/cross.mk
+++ b/rust193/cross.mk
@@ -22,8 +22,9 @@
#CROSS_ROOT= /u/i386
#CROSS_ROOT= /u/mipsel
#CROSS_ROOT= /u/riscv64
+#CROSS_ROOT= /u/m68k
#CROSS_ROOT= /
-#MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
+MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
# The GNU cross target designation
#GNU_CROSS_TARGET= armv7--netbsdelf-eabihf
@@ -35,6 +36,7 @@
#GNU_CROSS_TARGET= i486--netbsdelf
#GNU_CROSS_TARGET= mipsel--netbsd
#GNU_CROSS_TARGET= riscv64--netbsd
+#GNU_CROSS_TARGET= m68k--netbsdelf
#MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
# To cross-build rust, you need to specify
@@ -51,6 +53,7 @@
#TARGET= i586-unknown-netbsd
#TARGET= mipsel-unknown-netbsd
#TARGET= riscv64gc-unknown-netbsd
+#TARGET= m68k-unknown-netbsd
#
#SCRIPTS= ${WRKDIR}/scripts
#CONFIGURE_ARGS+= --host=${TARGET}
diff --git a/rust193/distinfo b/rust193/distinfo
index 374ad97847..28ad8eaaf8 100644
--- a/rust193/distinfo
+++ b/rust193/distinfo
@@ -105,9 +105,10 @@ Size (rustc-1.93.1-src.tar.gz) = 640951507 bytes
SHA1 (patch-compiler_rustc__codegen__ssa_src_back_linker.rs) = f6b18a54dd8c991f6304df35a59fee3d55b46ed3
SHA1 (patch-compiler_rustc__llvm_build.rs) = 3acef995e3038a98b29b31b9bdd43286b1ac29f7
SHA1 (patch-compiler_rustc__target_src_spec_base_netbsd.rs) = 4db00d8abecd8f343e3c22c272a8a4e1f9228532
-SHA1 (patch-compiler_rustc__target_src_spec_mod.rs) = a22b5d28997ed9a5565deec9c34322165d563d00
+SHA1 (patch-compiler_rustc__target_src_spec_mod.rs) = a465dc5c8409202df63327a911b3482a0a00d166
SHA1 (patch-compiler_rustc__target_src_spec_targets_aarch64__be__unknown__netbsd.rs) = 620eaf74c1dd030973af53dfe4f9aa998be5b123
SHA1 (patch-compiler_rustc__target_src_spec_targets_aarch64__unknown__netbsd.rs) = 1a02f2dd61a5f9cc4be1f66ac3404c961810c731
+SHA1 (patch-compiler_rustc__target_src_spec_targets_m68k__unknown__netbsd.rs) = 1862a68a0c835dd998267fd771a70574f0adab2e
SHA1 (patch-compiler_rustc__target_src_spec_targets_mips64el__unknown__netbsd.rs) = 5380b0052dad5316663be76269cbac84830b6c97
SHA1 (patch-compiler_rustc__target_src_spec_targets_mipsel__unknown__netbsd.rs) = 7deeb7d1d3306e96891dec144ac90398b88c6ad4
SHA1 (patch-library_backtrace_src_symbolize_gimli.rs) = 9d5ef634c5a454e474ea5fee76da9bb768f5b3d9
@@ -117,6 +118,7 @@ SHA1 (patch-src_bootstrap_bootstrap.py) = fb89adaaf01f558d636734db5d778af4a3c67f
SHA1 (patch-src_bootstrap_src_core_build__steps_compile.rs) = e928203ed4734c93cc33c5a3f7879cf18dcecc83
SHA1 (patch-src_bootstrap_src_core_build__steps_install.rs) = 00ceb941adbdd8fdb96f75dbcc50c2d2b3e55842
SHA1 (patch-src_bootstrap_src_core_builder_cargo.rs) = b7ce18d045c2ef250817ee4b6ed57e0524d99e71
+SHA1 (patch-src_bootstrap_src_core_sanity.rs) = deeb8a5d64e681f6be697f9e56073038a924c0d8
SHA1 (patch-src_bootstrap_src_lib.rs) = 735a3f6cbb3054200dd55eebce6e9acbd285f51e
SHA1 (patch-src_llvm-project_llvm_CMakeLists.txt) = 446acdd51fb6ddcba733371263aa2f9949299d31
SHA1 (patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake) = e1b2eb2f0b3cf1cf87b443656ae306b3242f6b12
@@ -142,7 +144,8 @@ SHA1 (patch-vendor_libc-0.2.172_src_unix_solarish_mod.rs) = 9365cab6fd25dd077ed5
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_mod.rs) = e7dc8f13f851e9423f126de7ffce6de5ecb7b74a
SHA1 (patch-vendor_libc-0.2.175_src_unix_bsd_netbsdlike_netbsd_riscv64.rs) = 866d84d8ff7740ca644fb8d63eb3289704b2746f
-SHA1 (patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_mod.rs) = f1cfcca26c13242377a3419bd87c1c6aec049086
+SHA1 (patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_m68k.rs) = 1e1b495b23362c79fbceb74797a18ea7038fe2e0
+SHA1 (patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_mod.rs) = 4a9ba4f47ae75318862f501160c25bb4ccf7dc7d
SHA1 (patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_riscv64.rs) = b2508d2e02883f69aba62e00490e2dd376ede2fd
SHA1 (patch-vendor_line-index-0.1.2_src_lib.rs) = 30aa5c82630ea0e8969abb527c11640712efba1e
SHA1 (patch-vendor_lzma-sys-0.1.20_config.h) = 4849052ddb2f04f539fd7060fc1b43cc3acf99c4
@@ -153,13 +156,13 @@ SHA1 (patch-vendor_memchr-2.7.4_src_memmem_searcher.rs) = a5038873015004ab0c8769
SHA1 (patch-vendor_memchr-2.7.4_src_vector.rs) = 50a901d061cf58a745b0c387a1c45ff2f0c54e89
SHA1 (patch-vendor_openssl-src-111.28.2+1.1.1w_openssl_Configurations_10-main.conf) = 8fc746574f16cd3294edce99beffc3e8c03a089b
SHA1 (patch-vendor_openssl-src-111.28.2+1.1.1w_openssl_crypto_aria_aria.c) = 1373d2e4ab609956e0e51ca3d900861caf3ee70d
-SHA1 (patch-vendor_openssl-src-111.28.2+1.1.1w_src_lib.rs) = b2c539ecafce940e5b8dcdb5951e15424a385bf1
+SHA1 (patch-vendor_openssl-src-111.28.2+1.1.1w_src_lib.rs) = c3260bfdd670c31845189fcb6b4ed19385a03b2a
SHA1 (patch-vendor_openssl-src-300.5.0+3.5.0_openssl_Configurations_10-main.conf) = 49803c889864dbeccba92095b9fa6f104ff0180a
SHA1 (patch-vendor_openssl-src-300.5.0+3.5.0_openssl_crypto_aria_aria.c) = 895b5f4d80fb714973f6d6fb1a39d89907e4976d
-SHA1 (patch-vendor_openssl-src-300.5.0+3.5.0_src_lib.rs) = 4c0f2796e28908d5d42749b03d210c649659cf6f
+SHA1 (patch-vendor_openssl-src-300.5.0+3.5.0_src_lib.rs) = 98e99556c19c055f696f0d9bfbce4aaf207b1640
SHA1 (patch-vendor_openssl-src-300.5.4+3.5.4_openssl_Configurations_10-main.conf) = cf8ea96ca5e47d8b236e7de9d766badcda7494aa
SHA1 (patch-vendor_openssl-src-300.5.4+3.5.4_openssl_crypto_aria_aria.c) = 3d3c52cad4faa7af77513eaab26b45ebfbcde906
-SHA1 (patch-vendor_openssl-src-300.5.4+3.5.4_src_lib.rs) = 4639e4eb655e7a4c3a37ca742fb21c5439bcb370
+SHA1 (patch-vendor_openssl-src-300.5.4+3.5.4_src_lib.rs) = 510afd69c6032fdbd2e42e6ffe208579876aed10
SHA1 (patch-vendor_openssl-sys-0.9.107_build_find__normal.rs) = b3de2b9137882e3612291057c1b7793a27de760f
SHA1 (patch-vendor_openssl-sys-0.9.107_build_main.rs) = 46627c013821166688d16d97f6f8ff4ccb552241
SHA1 (patch-vendor_openssl-sys-0.9.109_build_find__normal.rs) = 96b7b6067e857ef1ef4c8b832dcbe13496e21ca4
diff --git a/rust193/do-cross.mk b/rust193/do-cross.mk
index 36d5cd1a7f..d50f648b0a 100644
--- a/rust193/do-cross.mk
+++ b/rust193/do-cross.mk
@@ -14,6 +14,7 @@ SHORT_TARGETS+= arm64_be
SHORT_TARGETS+= i386
SHORT_TARGETS+= riscv64
SHORT_TARGETS+= mipsel # produces mips32 (not mips1) executables
+SHORT_TARGETS+= m68k
# Conditional local overrides of ROOT.* variables:
.sinclude "local-roots.mk"
@@ -29,6 +30,7 @@ ROOT.arm64_be?= /u/evbarm64eb
ROOT.i386?= /u/i386
ROOT.mipsel?= /u/mipsel
ROOT.riscv64?= /u/riscv64
+ROOT.m68k?= /u/m68k
# Mapping to GNU triple
G_TGT.armv7= armv7--netbsdelf-eabihf
@@ -40,6 +42,7 @@ G_TGT.arm64_be= aarch64_be--netbsd
G_TGT.i386= i486--netbsdelf
G_TGT.mipsel= mipsel--netbsd
G_TGT.riscv64= riscv64--netbsd
+G_TGT.m68k= m68k--netbsdelf
# Mapping to rust's TARGET specification
TGT.armv7= armv7-unknown-netbsd-eabihf
@@ -51,6 +54,7 @@ TGT.arm64_be= aarch64_be-unknown-netbsd
TGT.i386= i586-unknown-netbsd
TGT.mipsel= mipsel-unknown-netbsd
TGT.riscv64= riscv64gc-unknown-netbsd
+TGT.m68k= m68k-unknown-netbsd
# Optional target tweak for bootstrap files
#TT.powerpc= powerpc-unknown-netbsd90
diff --git a/rust193/files/gcc-wrap b/rust193/files/gcc-wrap
index 48e17d57fb..48cf4af822 100644
--- a/rust193/files/gcc-wrap
+++ b/rust193/files/gcc-wrap
@@ -37,6 +37,11 @@ else
powerpc*) # Now needed due to bloat
madd="-mlongcall"
;;
+ m68k-*) # needed due to exceeding 16-bit offsets
+ # ref.
+ # relocation truncated to fit: R_68K_PC16 against ...
+ madd="-mlong-jump-table-offsets"
+ ;;
esac
# We build both for -8 and -9 due to ABI differences,
# so can't just test $gnuarch... Yes, a vile hack.
diff --git a/rust193/patches/patch-compiler_rustc__target_src_spec_mod.rs b/rust193/patches/patch-compiler_rustc__target_src_spec_mod.rs
index 48bba380a5..d30e2b6c6c 100644
--- a/rust193/patches/patch-compiler_rustc__target_src_spec_mod.rs
+++ b/rust193/patches/patch-compiler_rustc__target_src_spec_mod.rs
@@ -1,10 +1,18 @@
$NetBSD: patch-compiler_rustc__target_src_spec_mod.rs,v 1.17 2024/04/18 09:29:42 pin Exp $
-Add entry for NetBSD/mips64el.
+Add entry for NetBSD/mips64el and NetBSD/m68k
---- compiler/rustc_target/src/spec/mod.rs.orig 2024-01-13 14:20:59.236278792 +0000
+--- compiler/rustc_target/src/spec/mod.rs.orig 2026-02-11 07:30:54.000000000 +0000
+++ compiler/rustc_target/src/spec/mod.rs
-@@ -1532,6 +1532,7 @@ supported_targets! {
+@@ -1440,6 +1440,7 @@ supported_targets! {
+ ("loongarch64-unknown-linux-musl", loongarch64_unknown_linux_musl),
+ ("m68k-unknown-linux-gnu", m68k_unknown_linux_gnu),
+ ("m68k-unknown-none-elf", m68k_unknown_none_elf),
++ ("m68k-unknown-netbsd", m68k_unknown_netbsd),
+ ("csky-unknown-linux-gnuabiv2", csky_unknown_linux_gnuabiv2),
+ ("csky-unknown-linux-gnuabiv2hf", csky_unknown_linux_gnuabiv2hf),
+ ("mips-unknown-linux-gnu", mips_unknown_linux_gnu),
+@@ -1529,6 +1530,7 @@ supported_targets! {
("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
("i586-unknown-netbsd", i586_unknown_netbsd),
("i686-unknown-netbsd", i686_unknown_netbsd),
diff --git a/rust193/patches/patch-compiler_rustc__target_src_spec_targets_m68k__unknown__netbsd.rs b/rust193/patches/patch-compiler_rustc__target_src_spec_targets_m68k__unknown__netbsd.rs
new file mode 100644
index 0000000000..8ade8f5369
--- /dev/null
+++ b/rust193/patches/patch-compiler_rustc__target_src_spec_targets_m68k__unknown__netbsd.rs
@@ -0,0 +1,38 @@
+$NetBSD$
+
+Add a target description for NetBSD/m68k.
+
+--- /dev/null 2026-02-24 21:43:45.067063051 +0000
++++ compiler/rustc_target/src/spec/targets/m68k_unknown_netbsd.rs 2026-02-24 21:48:57.106967890 +0000
+@@ -0,0 +1,31 @@
++use rustc_abi::Endian;
++
++use crate::spec::{Arch, LinkSelfContainedDefault, Target, TargetMetadata, TargetOptions, base};
++
++pub(crate) fn target() -> Target {
++ let mut base = base::netbsd::opts();
++ base.cpu = "M68020".into();
++ base.max_atomic_width = Some(32);
++
++ Target {
++ llvm_target: "m68k-unknown-netbsd".into(),
++ metadata: TargetMetadata {
++ description: Some("Motorola 680x0 NetBSD".into()),
++ tier: Some(3),
++ host_tools: Some(false),
++ std: Some(true),
++ },
++ pointer_width: 32,
++ data_layout: "E-m:e-p:32:16:32-i8:8:8-i16:16:16-i32:16:32-n8:16:32-a:0:16-S16".into(),
++ arch: Arch::M68k,
++ options: TargetOptions {
++ endian: Endian::Big,
++ mcount: "_mcount".into(),
++
++ // LLD currently does not have support for M68k
++ link_self_contained: LinkSelfContainedDefault::False,
++ ..base
++ },
++ }
++}
++
diff --git a/rust193/patches/patch-src_bootstrap_src_core_sanity.rs b/rust193/patches/patch-src_bootstrap_src_core_sanity.rs
new file mode 100644
index 0000000000..0d1fda0475
--- /dev/null
+++ b/rust193/patches/patch-src_bootstrap_src_core_sanity.rs
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Temporarily add m68k-unknown-netbsd to STAGE0_MISSING_TARGETS.
+...while we bootstrap the target.
+
+--- src/bootstrap/src/core/sanity.rs.orig 2026-02-24 22:45:56.679440377 +0000
++++ src/bootstrap/src/core/sanity.rs
+@@ -42,6 +42,7 @@ const STAGE0_MISSING_TARGETS: &[&str] =
+ // just a dummy comment so the list doesn't get onelined
+ "riscv64gc-unknown-redox",
+ "hexagon-unknown-qurt",
++ "m68k-unknown-netbsd",
+ ];
+
+ /// Minimum version threshold for libstdc++ required when using prebuilt LLVM
diff --git a/rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_m68k.rs b/rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_m68k.rs
new file mode 100644
index 0000000000..e7f19ecf34
--- /dev/null
+++ b/rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_m68k.rs
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Add cpu-specific file for m68k on NetBSD.
+
+--- /dev/null 2026-02-25 04:15:52.295235767 +0000
++++ vendor/libc-0.2.177/src/unix/bsd/netbsdlike/netbsd/m68k.rs 2026-02-25 10:17:54.356620620 +0000
+@@ -0,0 +1,10 @@
++use crate::prelude::*;
++use crate::PT_FIRSTMACH;
++
++pub type __cpu_simple_lock_nv_t = u8;
++
++pub(crate) const _ALIGNBYTES: usize = size_of::<c_int>() - 1;
++
++pub const PT_STEP: c_int = PT_FIRSTMACH + 0;
++pub const PT_GETREGS: c_int = PT_FIRSTMACH + 1;
++pub const PT_SETREGS: c_int = PT_FIRSTMACH + 2;
diff --git a/rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_mod.rs b/rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_mod.rs
index bfe53e213c..51b50ed4eb 100644
--- a/rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_mod.rs
+++ b/rust193/patches/patch-vendor_libc-0.2.177_src_unix_bsd_netbsdlike_netbsd_mod.rs
@@ -3,7 +3,9 @@ $NetBSD$
Use __pthread_spin_t to define pthread_spin_t, not c_uchar which
isn't universally this type on the various NetBSD targets.
---- vendor/libc-0.2.177/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig 2025-12-28 21:32:55.585212755 +0000
+Also add m68k target.
+
+--- vendor/libc-0.2.177/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig 2026-02-11 07:30:54.000000000 +0000
+++ vendor/libc-0.2.177/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -15,7 +15,7 @@ pub type lwpid_t = c_uint;
pub type shmatt_t = c_uint;
@@ -14,3 +16,13 @@ isn't universally this type on the various NetBSD targets.
pub type timer_t = c_int;
// elf.h
+@@ -3001,6 +3001,9 @@ cfg_if! {
+ } else if #[cfg(target_arch = "riscv64")] {
+ mod riscv64;
+ pub use self::riscv64::*;
++ } else if #[cfg(target_arch = "m68k")] {
++ mod m68k;
++ pub use self::m68k::*;
+ } else {
+ // Unknown target_arch
+ }
diff --git a/rust193/patches/patch-vendor_openssl-src-111.28.2+1.1.1w_src_lib.rs b/rust193/patches/patch-vendor_openssl-src-111.28.2+1.1.1w_src_lib.rs
index bff359039c..f7abd5d7d0 100644
--- a/rust193/patches/patch-vendor_openssl-src-111.28.2+1.1.1w_src_lib.rs
+++ b/rust193/patches/patch-vendor_openssl-src-111.28.2+1.1.1w_src_lib.rs
@@ -2,7 +2,7 @@ $NetBSD$
Add the various NetBSD targets.
---- vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs.orig 2025-05-18 13:26:41.970702318 +0000
+--- vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs.orig 2026-02-11 07:30:54.000000000 +0000
+++ vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs
@@ -239,6 +239,8 @@ impl Build {
"aarch64-unknown-freebsd" => "BSD-generic64",
@@ -31,15 +31,18 @@ Add the various NetBSD targets.
"i686-apple-darwin" => "darwin-i386-cc",
"i686-linux-android" => "linux-elf",
"i686-pc-windows-gnu" => "mingw",
-@@ -264,6 +269,7 @@ impl Build {
+@@ -264,8 +269,10 @@ impl Build {
"i686-unknown-freebsd" => "BSD-x86-elf",
"i686-unknown-linux-gnu" => "linux-elf",
"i686-unknown-linux-musl" => "linux-elf",
+ "i686-unknown-netbsd" => "BSD-x86-elf",
"loongarch64-unknown-linux-gnu" => "linux-generic64",
"loongarch64-unknown-linux-musl" => "linux-generic64",
++ "m68k-unknown-netbsd" => NetBSD-generic32,
"mips-unknown-linux-gnu" => "linux-mips32",
-@@ -274,9 +280,11 @@ impl Build {
+ "mips-unknown-linux-musl" => "linux-mips32",
+ "mips64-unknown-linux-gnuabi64" => "linux64-mips64",
+@@ -274,9 +281,11 @@ impl Build {
"mips64el-unknown-linux-muslabi64" => "linux64-mips64",
"mipsel-unknown-linux-gnu" => "linux-mips32",
"mipsel-unknown-linux-musl" => "linux-mips32",
@@ -51,7 +54,7 @@ Add the various NetBSD targets.
"powerpc64-unknown-freebsd" => "BSD-generic64",
"powerpc64-unknown-linux-gnu" => "linux-ppc64",
"powerpc64-unknown-linux-musl" => "linux-ppc64",
-@@ -284,8 +292,10 @@ impl Build {
+@@ -284,8 +293,10 @@ impl Build {
"powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
"powerpc64le-unknown-linux-musl" => "linux-ppc64le",
"riscv64gc-unknown-linux-gnu" => "linux-generic64",
diff --git a/rust193/patches/patch-vendor_openssl-src-300.5.0+3.5.0_src_lib.rs b/rust193/patches/patch-vendor_openssl-src-300.5.0+3.5.0_src_lib.rs
index 9fc8090a85..3851054519 100644
--- a/rust193/patches/patch-vendor_openssl-src-300.5.0+3.5.0_src_lib.rs
+++ b/rust193/patches/patch-vendor_openssl-src-300.5.0+3.5.0_src_lib.rs
@@ -1,8 +1,8 @@
$NetBSD$
-Make this build on NetBSD for arm64 and mipsel as well.
+Make this build on NetBSD for arm6, mipsel and m68k as well.
---- vendor/openssl-src-300.5.0+3.5.0/src/lib.rs.orig 2025-05-18 21:45:55.955282328 +0000
+--- vendor/openssl-src-300.5.0+3.5.0/src/lib.rs.orig 2026-02-11 07:30:54.000000000 +0000
+++ vendor/openssl-src-300.5.0+3.5.0/src/lib.rs
@@ -321,6 +321,7 @@ impl Build {
"armv5te-unknown-linux-gnueabi" => "linux-armv4",
@@ -12,7 +12,15 @@ Make this build on NetBSD for arm64 and mipsel as well.
"armv6-alpine-linux-musleabihf" => "linux-armv6",
"armv7-unknown-freebsd" => "BSD-armv4",
"armv7-unknown-linux-gnueabi" => "linux-armv4",
-@@ -356,6 +357,7 @@ impl Build {
+@@ -348,6 +349,7 @@ impl Build {
+ "i686-uwp-windows-msvc" => "VC-WIN32-UWP",
+ "loongarch64-unknown-linux-gnu" => "linux-generic64",
+ "loongarch64-unknown-linux-musl" => "linux-generic64",
++ "m68k-unknown-netbsd" => "NetBSD-generic32",
+ "mips-unknown-linux-gnu" => "linux-mips32",
+ "mips-unknown-linux-musl" => "linux-mips32",
+ "mips64-unknown-linux-gnuabi64" => "linux64-mips64",
+@@ -356,6 +358,7 @@ impl Build {
"mips64el-unknown-linux-muslabi64" => "linux64-mips64",
"mipsel-unknown-linux-gnu" => "linux-mips32",
"mipsel-unknown-linux-musl" => "linux-mips32",
diff --git a/rust193/patches/patch-vendor_openssl-src-300.5.4+3.5.4_src_lib.rs b/rust193/patches/patch-vendor_openssl-src-300.5.4+3.5.4_src_lib.rs
index e185bb51a9..8ebb0d1543 100644
--- a/rust193/patches/patch-vendor_openssl-src-300.5.4+3.5.4_src_lib.rs
+++ b/rust193/patches/patch-vendor_openssl-src-300.5.4+3.5.4_src_lib.rs
@@ -1,8 +1,8 @@
$NetBSD$
-Make this build on NetBSD for armv6 and mipsel as well.
+Make this build on NetBSD for armv6, mipsel and m68k as well.
---- vendor/openssl-src-300.5.4+3.5.4/src/lib.rs.orig 2025-11-02 17:17:16.773220231 +0000
+--- vendor/openssl-src-300.5.4+3.5.4/src/lib.rs.orig 2026-02-11 07:30:54.000000000 +0000
+++ vendor/openssl-src-300.5.4+3.5.4/src/lib.rs
@@ -326,6 +326,7 @@ impl Build {
"armv5te-unknown-linux-gnueabi" => "linux-armv4",
@@ -12,7 +12,15 @@ Make this build on NetBSD for armv6 and mipsel as well.
"armv6-alpine-linux-musleabihf" => "linux-armv6",
"armv7-unknown-freebsd" => "BSD-armv4",
"armv7-unknown-linux-gnueabi" => "linux-armv4",
-@@ -361,6 +362,7 @@ impl Build {
+@@ -353,6 +354,7 @@ impl Build {
+ "i686-uwp-windows-msvc" => "VC-WIN32-UWP",
+ "loongarch64-unknown-linux-gnu" => "linux-generic64",
+ "loongarch64-unknown-linux-musl" => "linux-generic64",
++ "m68k-unknown-netbsd" => NetBSD-generic32",
+ "mips-unknown-linux-gnu" => "linux-mips32",
+ "mips-unknown-linux-musl" => "linux-mips32",
+ "mips64-unknown-linux-gnuabi64" => "linux64-mips64",
+@@ -361,6 +363,7 @@ impl Build {
"mips64el-unknown-linux-muslabi64" => "linux64-mips64",
"mipsel-unknown-linux-gnu" => "linux-mips32",
"mipsel-unknown-linux-musl" => "linux-mips32",
Home |
Main Index |
Thread Index |
Old Index