Sun Mar 3 14:53:33 2024 UTC (83d)
rust: Upgrade to version 1.75.0.

Pkgsrc changes:
 * Adjust patches and cargo checksums to new versions.
 * For an external LLVM, set dependency of llvm >= 16, in accordance
   with the upstream changes.
 * Mark that on NetBSD we now need >= 9.0, so 8.x is no longer supported.
 * On NetBSD/sparc64 10.x, we now need GCC 12 to build the embedded
   LLVM, which is version 17; apparently GCC 10.4 or 10.5 mis-compiles it,
   resulting in an illegal instruction fault during the build.
   Ref. https://github.com/rust-lang/rust/issues/117231

Upstream changes:

Version 1.75.0 (2023-12-28)
==========================

- [Stabilize `async fn` and return-position `impl Trait` in traits.]
  (https://github.com/rust-lang/rust/pull/115822/)
- [Allow function pointer signatures containing `&mut T` in `const` contexts.]
  (https://github.com/rust-lang/rust/pull/116015/)
- [Match `usize`/`isize` exhaustively with half-open ranges.]
  (https://github.com/rust-lang/rust/pull/116692/)
- [Guarantee that `char` has the same size and alignment as `u32`.]
  (https://github.com/rust-lang/rust/pull/116894/)
- [Document that the null pointer has the 0 address.]
  (https://github.com/rust-lang/rust/pull/116988/)
- [Allow partially moved values in `match`.]
  (https://github.com/rust-lang/rust/pull/103208/)
- [Add notes about non-compliant FP behavior on 32bit x86 targets.]
  (https://github.com/rust-lang/rust/pull/113053/)
- [Stabilize ratified RISC-V target features.]
  (https://github.com/rust-lang/rust/pull/116485/)

Compiler
--------

- [Rework negative coherence to properly consider impls that only
  partly overlap.] (https://github.com/rust-lang/rust/pull/112875/)
- [Bump `COINDUCTIVE_OVERLAP_IN_COHERENCE` to deny, and warn in dependencies.]
  (https://github.com/rust-lang/rust/pull/116493/)
- [Consider alias bounds when computing liveness in NLL.]
  (https://github.com/rust-lang/rust/pull/116733/)
- [Add the V (vector) extension to the `riscv64-linux-android` target spec.]
  (https://github.com/rust-lang/rust/pull/116618/)
- [Automatically enable cross-crate inlining for small functions]
  (https://github.com/rust-lang/rust/pull/116505)
- Add several new tier 3 targets:
    - [`csky-unknown-linux-gnuabiv2hf`]
      (https://github.com/rust-lang/rust/pull/117049/)
    - [`i586-unknown-netbsd`]
      (https://github.com/rust-lang/rust/pull/117170/)
    - [`mipsel-unknown-netbsd`]
      (https://github.com/rust-lang/rust/pull/117356/)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

Libraries
---------

- [Override `Waker::clone_from` to avoid cloning `Waker`s unnecessarily.]
  (https://github.com/rust-lang/rust/pull/96979/)
- [Implement `BufRead` for `VecDeque<u8>`.]
  (https://github.com/rust-lang/rust/pull/110604/)
- [Implement `FusedIterator` for `DecodeUtf16` when the inner iterator does.]
  (https://github.com/rust-lang/rust/pull/110729/)
- [Implement `Not, Bit{And,Or}{,Assign}` for IP addresses.]
  (https://github.com/rust-lang/rust/pull/113747/)
- [Implement `Default` for `ExitCode`.]
  (https://github.com/rust-lang/rust/pull/114589/)
- [Guarantee representation of None in NPO]
  (https://github.com/rust-lang/rust/pull/115333/)
- [Document when atomic loads are guaranteed read-only.]
  (https://github.com/rust-lang/rust/pull/115577/)
- [Broaden the consequences of recursive TLS initialization.]
  (https://github.com/rust-lang/rust/pull/116172/)
- [Windows: Support sub-millisecond sleep.]
  (https://github.com/rust-lang/rust/pull/116461/)
- [Fix generic bound of `str::SplitInclusive`'s `DoubleEndedIterator` impl]
  (https://github.com/rust-lang/rust/pull/100806/)
- [Fix exit status / wait status on non-Unix `cfg(unix)` platforms.]
  (https://github.com/rust-lang/rust/pull/115108/)

Stabilized APIs
---------------

- [`Atomic*::from_ptr`]
  (https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicUsize.html#method.from_ptr)
- [`FileTimes`]
  (https://doc.rust-lang.org/stable/std/fs/struct.FileTimes.html)
- [`FileTimesExt`]
  (https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTimesExt.html)
- [`File::set_modified`]
  (https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.set_modified)
- [`File::set_times`]
  (https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.set_times)
- [`IpAddr::to_canonical`]
  (https://doc.rust-lang.org/stable/core/net/enum.IpAddr.html#method.to_canonical)
- [`Ipv6Addr::to_canonical`]
  (https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.to_canonical)
- [`Option::as_slice`]
  (https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.as_slice)
- [`Option::as_mut_slice`]
  (https://doc.rust-lang.org/stable/core/option/enum.Option.html#method.as_mut_slice)
- [`pointer::byte_add`]
  (https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.byte_add)
- [`pointer::byte_offset`]
  (https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.byte_offset)
- [`pointer::byte_offset_from`]
  (https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.byte_offset_from)
- [`pointer::byte_sub`]
  (https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.byte_sub)
- [`pointer::wrapping_byte_add`]
  (https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.wrapping_byte_add)
- [`pointer::wrapping_byte_offset`]
  (https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.wrapping_byte_offset)
- [`pointer::wrapping_byte_sub`]
  (https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.wrapping_byte_sub)

These APIs are now stable in const contexts:

- [`Ipv6Addr::to_ipv4_mapped`]
  (https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.to_ipv4_mapped)
- [`MaybeUninit::assume_init_read`]
  (https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.assume_init_read)
- [`MaybeUninit::zeroed`]
  (https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.zeroed)
- [`mem::discriminant`]
  (https://doc.rust-lang.org/stable/core/mem/fn.discriminant.html)
- [`mem::zeroed`]
  (https://doc.rust-lang.org/stable/core/mem/fn.zeroed.html)

Cargo
-----

- [Add new packages to `[workspace.members]` automatically.]
  (https://github.com/rust-lang/cargo/pull/12779/)
- [Allow version-less `Cargo.toml` manifests.]
  (https://github.com/rust-lang/cargo/pull/12786/)
- [Make browser links out of HTML file paths.]
  (https://github.com/rust-lang/cargo/pull/12889)

Rustdoc
-------

- [Accept less invalid Rust in rustdoc.]
  (https://github.com/rust-lang/rust/pull/117450/)
- [Document lack of object safety on affected traits.]
  (https://github.com/rust-lang/rust/pull/113241/)
- [Hide `#[repr(transparent)]` if it isn't part of the public ABI.]
  (https://github.com/rust-lang/rust/pull/115439/)
- [Show enum discriminant if it is a C-like variant.]
  (https://github.com/rust-lang/rust/pull/116142/)

Compatibility Notes
-------------------

- [FreeBSD targets now require at least version 12.]
  (https://github.com/rust-lang/rust/pull/114521/)
- [Formally demote tier 2 MIPS targets to tier 3.]
  (https://github.com/rust-lang/rust/pull/115238/)
- [Make misalignment a hard error in `const` contexts.]
  (https://github.com/rust-lang/rust/pull/115524/)
- [Fix detecting references to packed unsized fields.]
  (https://github.com/rust-lang/rust/pull/115583/)
- [Remove support for compiler plugins.]
  (https://github.com/rust-lang/rust/pull/116412/)


(he)
diff -r1.302 -r1.303 pkgsrc/lang/rust/Makefile
diff -r1.34 -r1.35 pkgsrc/lang/rust/options.mk
diff -r1.20 -r1.21 pkgsrc/lang/rust/platform.mk
diff -r1.15 -r1.16 pkgsrc/lang/rust/patches/patch-compiler_rustc__llvm_build.rs
diff -r1.15 -r1.16 pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mod.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_base_netbsd.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_targets_mips64el__unknown__netbsd.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-src_bootstrap_src_core_build__steps_compile.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-src_bootstrap_src_core_build__steps_llvm.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-src_bootstrap_src_core_builder.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-src_bootstrap_src_lib.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike+netbsd_mips.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike_netbsd_mod.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike_netbsd_riscv64.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.148_src_unix_solarish_mod.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_mips.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_mod.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_riscv64.rs
diff -r0 -r1.1 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_solarish_mod.rs
diff -r1.10 -r0 pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_i586__unknown__netbsd.rs
diff -r1.3 -r0 pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mips64el__unknown__netbsd.rs
diff -r1.3 -r0 pkgsrc/lang/rust/patches/patch-src_bootstrap_llvm.rs
diff -r1.3 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_mips.rs
diff -r1.3 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_riscv64.rs
diff -r1.3 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_riscv64.rs
diff -r1.4 -r0 pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mipsel__unknown__netbsd.rs
diff -r1.4 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mips.rs
diff -r1.9 -r0 pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_netbsd__base.rs
diff -r1.9 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
diff -r1.6 -r1.7 pkgsrc/lang/rust/patches/patch-library_backtrace_src_symbolize_gimli_elf.rs
diff -r1.21 -r1.22 pkgsrc/lang/rust/patches/patch-src_bootstrap_bootstrap.py
diff -r1.29 -r0 pkgsrc/lang/rust/patches/patch-src_bootstrap_builder.rs
diff -r1.14 -r0 pkgsrc/lang/rust/patches/patch-src_bootstrap_compile.rs
diff -r1.21 -r0 pkgsrc/lang/rust/patches/patch-src_bootstrap_lib.rs
diff -r1.12 -r1.13 pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh
diff -r1.12 -r1.13 pkgsrc/lang/rust/patches/patch-vendor_target-lexicon_src_targets.rs
diff -r1.5 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_mod.rs
diff -r1.2 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_mips.rs
diff -r1.2 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_mod.rs
diff -r1.2 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_riscv64.rs
diff -r1.1 -r0 pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_solarish_mod.rs
diff -r1.13 -r1.14 pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_solarish_mod.rs
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-src_bootstrap_src_core_build__steps_llvm.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_mips.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_mod.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_riscv64.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_solarish_mod.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_i586__unknown__netbsd.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mips64el__unknown__netbsd.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jul 10 21:01:24 2023
pkgsrc/lang/rust/patches/patch-src_bootstrap_llvm.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_mips.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jul 10 21:01:24 2023
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_riscv64.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jul 10 21:01:24 2023
pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_riscv64.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mipsel__unknown__netbsd.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mips.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_netbsd__base.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jul 10 21:01:24 2023
pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-src_bootstrap_builder.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-src_bootstrap_compile.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jun 26 19:39:01 2023
pkgsrc/lang/rust/patches/patch-src_bootstrap_lib.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Mon Jul 10 21:01:24 2023
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_mod.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_mips.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_mod.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_riscv64.rs,v

anoncvs not yet been updated
Sun Mar 3 23:53:33 2024
Thu Jan 1 09:00:00 1970
pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_solarish_mod.rs,v

anoncvs not yet been updated

cvs diff -r1.302 -r1.303 pkgsrc/lang/rust/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/rust/Makefile 2024/01/15 15:15:01 1.302
+++ pkgsrc/lang/rust/Makefile 2024/03/03 14:53:32 1.303
@@ -1,33 +1,31 @@ @@ -1,33 +1,31 @@
1# $NetBSD: Makefile,v 1.302 2024/01/15 15:15:01 jperkin Exp $ 1# $NetBSD: Makefile,v 1.303 2024/03/03 14:53:32 he Exp $
2 2
3DISTNAME= rustc-1.74.1-src 3DISTNAME= rustc-1.75.0-src
4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} 4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
5CATEGORIES= lang 5CATEGORIES= lang
6PKGREVISION= 1 
7MASTER_SITES= https://static.rust-lang.org/dist/ 6MASTER_SITES= https://static.rust-lang.org/dist/
8 7
9MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.rust-lang.org/ 9HOMEPAGE= https://www.rust-lang.org/
11COMMENT= Safe, concurrent, practical language 10COMMENT= Safe, concurrent, practical language
12LICENSE= mit OR apache-2.0 11LICENSE= mit OR apache-2.0
13 12
14CONFLICTS+= rust-bin-[0-9]* 13CONFLICTS+= rust-bin-[0-9]*
15 14
16# LLVM uses -std=c++17 15# LLVM uses -std=c++17
17USE_CXX_FEATURES+= c++17 16USE_CXX_FEATURES+= c++17
18 
19USE_GCC_RUNTIME= yes 17USE_GCC_RUNTIME= yes
20USE_LANGUAGES= c c++17 18USE_LANGUAGES= c c++
21USE_LIBTOOL= yes 19USE_LIBTOOL= yes
22USE_TOOLS+= bash grep gmake perl:build pkg-config 20USE_TOOLS+= bash grep gmake perl:build pkg-config
23 21
24# The NetBSD bootstraps are built for NetBSD 8 (because rust doesn't 22# The NetBSD bootstraps are built for NetBSD 8 (because rust doesn't
25# build on 7). Mark earlier versions as broken. 23# build on 7). Mark earlier versions as broken.
26BROKEN_ON_PLATFORM+= NetBSD-[1-7].*-* 24BROKEN_ON_PLATFORM+= NetBSD-[1-7].*-*
27# Bootstrap is built for NetBSD 9.x on these platforms: 25# Bootstrap is built for NetBSD 9.x on these platforms:
28BROKEN_ON_PLATFORM+= NetBSD-8.*-*arm* 26BROKEN_ON_PLATFORM+= NetBSD-8.*-*arm*
29BROKEN_ON_PLATFORM+= NetBSD-8.*-aarch64 27BROKEN_ON_PLATFORM+= NetBSD-8.*-aarch64
30BROKEN_ON_PLATFORM+= NetBSD-8.*-sparc64 28BROKEN_ON_PLATFORM+= NetBSD-8.*-sparc64
31BROKEN_ON_PLATFORM+= NetBSD-8.*-powerpc 29BROKEN_ON_PLATFORM+= NetBSD-8.*-powerpc
32BROKEN_ON_PLATFORM+= NetBSD-8.*-i386 30BROKEN_ON_PLATFORM+= NetBSD-8.*-i386
33 31
@@ -211,264 +209,255 @@ BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--en @@ -211,264 +209,255 @@ BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--en
211.if ${MACHINE_PLATFORM:MDarwin-*-aarch64} 209.if ${MACHINE_PLATFORM:MDarwin-*-aarch64}
212BUILDLINK_TRANSFORM+= opt:x86_64:arm64 210BUILDLINK_TRANSFORM+= opt:x86_64:arm64
213.endif 211.endif
214 212
215# 213#
216# Rust unfortunately requires itself to build. On platforms which aren't 214# Rust unfortunately requires itself to build. On platforms which aren't
217# supported by upstream (where they offer binary bootstraps), or where we do 215# supported by upstream (where they offer binary bootstraps), or where we do
218# not trust random binaries from the Internet, we need to build and provide our 216# not trust random binaries from the Internet, we need to build and provide our
219# own bootstrap. See the stage0-bootstrap below for more details. 217# own bootstrap. See the stage0-bootstrap below for more details.
220# 218#
221DISTFILES:= ${DEFAULT_DISTFILES} 219DISTFILES:= ${DEFAULT_DISTFILES}
222 220
223.if ${MACHINE_PLATFORM:MDarwin-*-aarch64} || make(distinfo) || make (makesum) || make(mdi) 221.if ${MACHINE_PLATFORM:MDarwin-*-aarch64} || make(distinfo) || make (makesum) || make(mdi)
224RUST_STAGE0_VER= 1.73.0 222RUST_STAGE0_VER= 1.74.1
225RUST_ARCH:= aarch64-apple-darwin 223RUST_ARCH:= aarch64-apple-darwin
226RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 224RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
227RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 225RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
228DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 226DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
229.endif 227.endif
230.if ${MACHINE_PLATFORM:MDarwin-*-x86_64} || make(distinfo) || make (makesum) || make(mdi) 228.if ${MACHINE_PLATFORM:MDarwin-*-x86_64} || make(distinfo) || make (makesum) || make(mdi)
231RUST_STAGE0_VER= 1.73.0 229RUST_STAGE0_VER= 1.74.1
232RUST_ARCH:= x86_64-apple-darwin 230RUST_ARCH:= x86_64-apple-darwin
233RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 231RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
234RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 232RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
235DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 233DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
236.endif 234.endif
237.if ${MACHINE_PLATFORM:MLinux-*-aarch64} || make(distinfo) || make (makesum) || make(mdi) 235.if ${MACHINE_PLATFORM:MLinux-*-aarch64} || make(distinfo) || make (makesum) || make(mdi)
238RUST_STAGE0_VER= 1.73.0 236RUST_STAGE0_VER= 1.74.1
239RUST_ARCH:= aarch64-unknown-linux-gnu 237RUST_ARCH:= aarch64-unknown-linux-gnu
240RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 238RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
241RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 239RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
242DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 240DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
243.endif 241.endif
244.if ${MACHINE_PLATFORM:MLinux-*-earmv6hf} || make(distinfo) || make (makesum) || make(mdi) 242.if ${MACHINE_PLATFORM:MLinux-*-earmv6hf} || make(distinfo) || make (makesum) || make(mdi)
245RUST_STAGE0_VER= 1.73.0 243RUST_STAGE0_VER= 1.74.1
246RUST_ARCH:= arm-unknown-linux-gnueabihf 244RUST_ARCH:= arm-unknown-linux-gnueabihf
247RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 245RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
248RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 246RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
249DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 247DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
250.endif 248.endif
251.if ${MACHINE_PLATFORM:MLinux-*-earmv7hf} || make(distinfo) || make (makesum) || make(mdi) 249.if ${MACHINE_PLATFORM:MLinux-*-earmv7hf} || make(distinfo) || make (makesum) || make(mdi)
252RUST_STAGE0_VER= 1.73.0 250RUST_STAGE0_VER= 1.74.1
253RUST_ARCH:= armv7-unknown-linux-gnueabihf 251RUST_ARCH:= armv7-unknown-linux-gnueabihf
254RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 252RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
255RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 253RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
256DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 254DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
257.endif 255.endif
258.if ${MACHINE_PLATFORM:MLinux-*-i386} || make(distinfo) || make (makesum) || make(mdi) 256.if ${MACHINE_PLATFORM:MLinux-*-i386} || make(distinfo) || make (makesum) || make(mdi)
259RUST_STAGE0_VER= 1.73.0 257RUST_STAGE0_VER= 1.74.1
260RUST_ARCH:= i686-unknown-linux-gnu 258RUST_ARCH:= i686-unknown-linux-gnu
261RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 259RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
262RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 260RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
263DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 261DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
264.endif 262.endif
265.if ${MACHINE_PLATFORM:MLinux-*-x86_64} || make(distinfo) || make (makesum) || make(mdi) 263.if ${MACHINE_PLATFORM:MLinux-*-x86_64} || make(distinfo) || make (makesum) || make(mdi)
266RUST_STAGE0_VER= 1.73.0 264RUST_STAGE0_VER= 1.74.1
267RUST_ARCH:= x86_64-unknown-linux-gnu 265RUST_ARCH:= x86_64-unknown-linux-gnu
268RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 266RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
269RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 267RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
270DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 268DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
271.endif 269.endif
272# 270#
273# The SunOS target defaults to illumos as that's what the current bootstraps 271# The SunOS target defaults to illumos as that's what the current bootstraps
274# are built on. If you wish to target Oracle Solaris you'll need to create an 272# are built on. If you wish to target Oracle Solaris you'll need to create an
275# x86_64-sun-solaris bootstrap and comment out the overrides. 273# x86_64-sun-solaris bootstrap and comment out the overrides.
276# 274#
277.if ${MACHINE_PLATFORM:MSunOS-*-x86_64} || make(distinfo) || make (makesum) || make(mdi) 275.if ${MACHINE_PLATFORM:MSunOS-*-x86_64} || make(distinfo) || make (makesum) || make(mdi)
278RUST_STAGE0_VER= 1.73.0 276RUST_STAGE0_VER= 1.74.1
279RUST_ARCH:= x86_64-unknown-illumos 277RUST_ARCH:= x86_64-unknown-illumos
280RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 278RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
281SITES.${RUST_STAGE0}= https://us-central.manta.mnx.io/pkgsrc/public/pkg-bootstraps/ 279SITES.${RUST_STAGE0}= https://us-central.manta.mnx.io/pkgsrc/public/pkg-bootstraps/
282DISTFILES:= ${DISTFILES} ${RUST_STAGE0} 280DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
283RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH} 281RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}
284# Override default "x86_64-sun-solaris" selection 282# Override default "x86_64-sun-solaris" selection
285CONFIGURE_ARGS+= --set=target.${RUST_ARCH}.llvm-config=${LLVM_CONFIG_PATH} 283CONFIGURE_ARGS+= --set=target.${RUST_ARCH}.llvm-config=${LLVM_CONFIG_PATH}
286CONFIGURE_ARGS+= --build=${RUST_ARCH} 284CONFIGURE_ARGS+= --build=${RUST_ARCH}
287CONFIGURE_ARGS+= --host=${RUST_ARCH} 285CONFIGURE_ARGS+= --host=${RUST_ARCH}
288CONFIGURE_ARGS+= --target=${RUST_ARCH} 286CONFIGURE_ARGS+= --target=${RUST_ARCH}
289.endif 287.endif
290.if ${MACHINE_PLATFORM:MFreeBSD-*-x86_64} || make(distinfo) || make (makesum) || make(mdi) 288.if ${MACHINE_PLATFORM:MFreeBSD-*-x86_64} || make(distinfo) || make (makesum) || make(mdi)
291RUST_STAGE0_VER= 1.73.0 289RUST_STAGE0_VER= 1.74.1
292RUST_ARCH:= x86_64-unknown-freebsd 290RUST_ARCH:= x86_64-unknown-freebsd
293RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 291RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
294RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz 292RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
295DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 293DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
296.endif 294.endif
297.if ${MACHINE_PLATFORM:MNetBSD-*-i386} || make(distinfo) || make (makesum) || make(mdi) 295.if ${MACHINE_PLATFORM:MNetBSD-*-i386} || make(distinfo) || make (makesum) || make(mdi)
298RUST_STAGE0_VER= 1.73.0 296RUST_STAGE0_VER= 1.74.1
299RUST_ARCH= i586-unknown-netbsd 297RUST_ARCH= i586-unknown-netbsd
300RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 298RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
301RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 299RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
302SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 300SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
303SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 301SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
304DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 302DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
305# Setting this changes it for every distfile, which doesn't match what is 303# Setting this changes it for every distfile, which doesn't match what is
306# currently in distinfo. 304# currently in distinfo.
307#DIST_SUBDIR= ${PKGNAME} 305#DIST_SUBDIR= ${PKGNAME}
308# For atomic ops 306# For atomic ops
309CFLAGS+= -march=i586 307CFLAGS+= -march=i586
310CONFIGURE_ARGS+= --build=${RUST_ARCH} 308CONFIGURE_ARGS+= --build=${RUST_ARCH}
311pre-build: pre-build-fix-paxctl 309pre-build: pre-build-fix-paxctl
312.PHONY: pre-build-fix-paxctl 310.PHONY: pre-build-fix-paxctl
313pre-build-fix-paxctl: 311pre-build-fix-paxctl:
314 ${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/cargo 312 ${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/cargo
315 ${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/rustc 313 ${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/rustc
316.endif 314.endif
317.if ${MACHINE_PLATFORM:MNetBSD-*-x86_64} || make(distinfo) || make (makesum) || make(mdi) 315.if ${MACHINE_PLATFORM:MNetBSD-*-x86_64} || make(distinfo) || make (makesum) || make(mdi)
318RUST_STAGE0_VER= 1.73.0 316RUST_STAGE0_VER= 1.74.1
319RUST_ARCH= x86_64-unknown-netbsd 317RUST_ARCH= x86_64-unknown-netbsd
320RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 318RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
321RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 319RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
322DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 320DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
323.endif 321.endif
324.if ${MACHINE_PLATFORM:MNetBSD-*-powerpc} || make(distinfo) || make (makesum) || make(mdi) 322.if ${MACHINE_PLATFORM:MNetBSD-*-powerpc} || make(distinfo) || make (makesum) || make(mdi)
325RUST_STAGE0_VER= 1.73.0 323RUST_STAGE0_VER= 1.74.1
326RUST_ARCH= powerpc-unknown-netbsd-nb1 324RUST_ARCH= powerpc-unknown-netbsd
327 325
328# Cross-built against NetBSD 9.0 326# Cross-built against NetBSD 9.0
329RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 327RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
330RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 328RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
331DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 329DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
332SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 330SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
333SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 331SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
334 332
335.endif 333.endif
336.if ${MACHINE_PLATFORM:MNetBSD-*-aarch64} || make(distinfo) || make (makesum) || make(mdi) 334.if ${MACHINE_PLATFORM:MNetBSD-*-aarch64} || make(distinfo) || make (makesum) || make(mdi)
337RUST_STAGE0_VER= 1.73.0 335RUST_STAGE0_VER= 1.74.1
338RUST_ARCH= aarch64-unknown-netbsd 336RUST_ARCH= aarch64-unknown-netbsd
339RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 337RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
340RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 338RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
341DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 339DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
342SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 340SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
343SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 341SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
344.endif 342.endif
345.if ${MACHINE_PLATFORM:MNetBSD-*-aarch64eb} || make(distinfo) || make (makesum) || make(mdi) 343.if ${MACHINE_PLATFORM:MNetBSD-*-aarch64eb} || make(distinfo) || make (makesum) || make(mdi)
346RUST_STAGE0_VER= 1.73.0 344RUST_STAGE0_VER= 1.74.1
347RUST_ARCH= aarch64_be-unknown-netbsd 345RUST_ARCH= aarch64_be-unknown-netbsd
348RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 346RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
349RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 347RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
350DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 348DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
351SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 349SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
352SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 350SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
353.endif 351.endif
354.if ${MACHINE_PLATFORM:MNetBSD-*-sparc64} || make(distinfo) || make (makesum) || make(mdi) 352.if ${MACHINE_PLATFORM:MNetBSD-*-sparc64} || make(distinfo) || make (makesum) || make(mdi)
355RUST_STAGE0_VER= 1.73.0 353RUST_STAGE0_VER= 1.74.1
356RUST_ARCH= sparc64-unknown-netbsd 354RUST_ARCH= sparc64-unknown-netbsd
357RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 355RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
358RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 356RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
359DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 357DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
360SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 358SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
361SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 359SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
362.endif 360.endif
363.if ${MACHINE_PLATFORM:MNetBSD-*-earmv7hf} || make(distinfo) || make (makesum) || make(mdi) 361.if ${MACHINE_PLATFORM:MNetBSD-*-earmv7hf} || make(distinfo) || make (makesum) || make(mdi)
364RUST_ARCH= armv7-unknown-netbsd-eabihf 362RUST_ARCH= armv7-unknown-netbsd-eabihf
365RUST_STAGE0_VER= 1.73.0 363RUST_STAGE0_VER= 1.74.1
366RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 364RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
367RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 365RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
368DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 366DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
369SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 367SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
370SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 368SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
371.endif 369.endif
372.if ${MACHINE_PLATFORM:MNetBSD-*-earmv6hf} || make(distinfo) || make (makesum) || make(mdi) 370.if ${MACHINE_PLATFORM:MNetBSD-*-earmv6hf} || make(distinfo) || make (makesum) || make(mdi)
373RUST_ARCH= armv6-unknown-netbsd-eabihf 371RUST_ARCH= armv6-unknown-netbsd-eabihf
374RUST_STAGE0_VER= 1.73.0 372RUST_STAGE0_VER= 1.74.1
375RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 373RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
376RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 374RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
377DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 375DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
378SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 376SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
379SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 377SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
380.endif 378.endif
381.if ${MACHINE_PLATFORM:MNetBSD-*-mipsel} || make(distinfo) || make (makesum) || make(mdi) 379.if ${MACHINE_PLATFORM:MNetBSD-*-mipsel} || make(distinfo) || make (makesum) || make(mdi)
382RUST_ARCH= mipsel-unknown-netbsd 380RUST_ARCH= mipsel-unknown-netbsd
383RUST_STAGE0_VER= 1.73.0 381RUST_STAGE0_VER= 1.74.1
384RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 382RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
385RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 383RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
386DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 384DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
387SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 385SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
388SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 386SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
389.endif 387.endif
390.if ${MACHINE_PLATFORM:MNetBSD-*-riscv64} || make(distinfo) || make (makesum) || make(mdi) 388.if ${MACHINE_PLATFORM:MNetBSD-*-riscv64} || make(distinfo) || make (makesum) || make(mdi)
391RUST_ARCH= riscv64gc-unknown-netbsd 389RUST_ARCH= riscv64gc-unknown-netbsd
392RUST_STAGE0_VER= 1.73.0 390RUST_STAGE0_VER= 1.74.1
393RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 391RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
394RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz 392RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
395DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0} 393DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
396SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 394SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
397SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/} 395SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
398.endif 396.endif
399 397
400# You may override RUST_BOOTSTRAP_PATH and RUST_ARCH in mk.conf 398# You may override RUST_BOOTSTRAP_PATH and RUST_ARCH in mk.conf
401# if you have a local bootstrap compiler. 399# if you have a local bootstrap compiler.
402.if !defined(RUST_ARCH) && !defined(RUST_BOOTSTRAP_PATH) 400.if !defined(RUST_ARCH) && !defined(RUST_BOOTSTRAP_PATH)
403NOT_FOR_PLATFORM+= ${MACHINE_PLATFORM} 401NOT_FOR_PLATFORM+= ${MACHINE_PLATFORM}
404.else 402.else
405RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-bootstrap 403RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-bootstrap
406.endif 404.endif
407 405
408.if ${OPSYS} == "SunOS" 406.if ${OPSYS} == "SunOS"
409TOOL_DEPENDS+= coreutils>=0:../../sysutils/coreutils 407TOOL_DEPENDS+= coreutils>=0:../../sysutils/coreutils
410TOOL_DEPENDS+= gzip>=0:../../archivers/gzip 408TOOL_DEPENDS+= gzip>=0:../../archivers/gzip
411TOOLS_CREATE+= md5sum 409TOOLS_CREATE+= md5sum
412TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum 410TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum
413TOOLS_PLATFORM.gzcat= ${PREFIX}/bin/gzip -cd 411TOOLS_PLATFORM.gzcat= ${PREFIX}/bin/gzip -cd
414.endif 412.endif
415 413
416SUBST_CLASSES+= rpath 414SUBST_CLASSES+= prefix
417SUBST_STAGE.rpath= pre-configure 415SUBST_STAGE.prefix= pre-configure
418SUBST_FILES.rpath+= compiler/rustc_codegen_ssa/src/back/linker.rs 416SUBST_FILES.prefix+= compiler/rustc_codegen_ssa/src/back/linker.rs
419SUBST_FILES.rpath+= compiler/rustc_target/src/spec/netbsd_base.rs 417SUBST_FILES.prefix+= compiler/rustc_target/src/spec/base/netbsd.rs
420SUBST_FILES.rpath+= src/bootstrap/builder.rs 418SUBST_FILES.prefix+= src/bootstrap/src/core/build_steps/compile.rs
421SUBST_FILES.rpath+= src/bootstrap/compile.rs 419SUBST_FILES.prefix+= src/bootstrap/src/core/builder.rs
422SUBST_VARS.rpath= PREFIX 420SUBST_FILES.prefix+= src/bootstrap/bootstrap.py
 421SUBST_VARS.prefix= PREFIX
423 422
424# 423#
425# Generate list of subst entries for various .cargo-checksum.json files. These 424# Generate list of subst entries for various .cargo-checksum.json files. These
426# are all handled together in one big substitution to simplify things rather 425# are all handled together in one big substitution to simplify things rather
427# than one substitution entry per file, but are kept separate below to ease 426# than one substitution entry per file, but are kept separate below to ease
428# updating and verification. 427# updating and verification.
429# 428#
430 429
431CKSUM_CRATES+= vendor/cc-1.0.73 
432CKSUMS+= 38970d678de0efb4b5e2978265daa8a613a1db35fc42e669621b03fc56d5b138 
433CKSUMS+= 65de0d6593a4256e5fcaf898f9468d71bab672c70a2dfab3dcb8514e9b72819c 
434 
435CKSUM_CRATES+= vendor/cc 
436CKSUMS+= 17a4659710aa290c4ed9c23063c7b202c5bcf2a84de33aa1f01fc6fded69a1f8 
437CKSUMS+= a19bcb1a561d4ba5846f8f89fcfe6f05a3cb2e79baf8f21f53f0fba012db1b7f 
438 
439CKSUM_CRATES+= vendor/libc 430CKSUM_CRATES+= vendor/libc
 431
 432CKSUM_CRATES+= vendor/libc-0.2.146
440CKSUMS+= 55ce4624745e31ad226b47fde177a46176a89da3fa5030663673a115102471f9 433CKSUMS+= 55ce4624745e31ad226b47fde177a46176a89da3fa5030663673a115102471f9
441CKSUMS+= 09ab15cd50245f4ced230b7919657ab170e06443bb0ed4baf4449d3472f5f656 434CKSUMS+= 09ab15cd50245f4ced230b7919657ab170e06443bb0ed4baf4449d3472f5f656
442CKSUMS+= 90dd33ef20dc3be8aef5bd152a6a06e7ab34f9527b3978487b593aaa16a907bd 435CKSUMS+= 90dd33ef20dc3be8aef5bd152a6a06e7ab34f9527b3978487b593aaa16a907bd
443CKSUMS+= ec1cb2b8522ce7d35c9fce2f5b17a1a7e28cae9836f1cf11e267f222b72dff60 436CKSUMS+= ec1cb2b8522ce7d35c9fce2f5b17a1a7e28cae9836f1cf11e267f222b72dff60
 437
 438CKSUM_CRATES+= vendor/libc-0.2.149
 439CKSUMS+= 1f1beb74c33bd3ad6a5d7aae2afdacf0ccbad0f9dacda2894d2cfdc2414174ae
 440CKSUMS+= 80f3168251556b3eb918056aa9563db07383f61e69a262f3af390b542fd757bb
444CKSUMS+= b1660c631a599a3355116e7485b88ab2f8f2929c2e37851a763431387b902f14 441CKSUMS+= b1660c631a599a3355116e7485b88ab2f8f2929c2e37851a763431387b902f14
445CKSUMS+= 990d1c6c01db31b9e5541128e4987b114f39c6808d94a5f8f048f492cfb96d78 442CKSUMS+= 990d1c6c01db31b9e5541128e4987b114f39c6808d94a5f8f048f492cfb96d78
446 443
447CKSUM_CRATES+= vendor/libc-0.2.138 444CKSUM_CRATES+= vendor/cc-1.0.73
448CKSUMS+= 107a4aa396b8383c66e0ace2f941450b4b69146558cdc4d9fbe33eeab51760f1 445CKSUMS+= 38970d678de0efb4b5e2978265daa8a613a1db35fc42e669621b03fc56d5b138
449CKSUMS+= 4be83bef456569d59405edf134e7fe8eff78f3fe35f1efd60e15405d5c822725 446CKSUMS+= 65de0d6593a4256e5fcaf898f9468d71bab672c70a2dfab3dcb8514e9b72819c
450 
451CKSUM_CRATES+= vendor/libc-0.2.140 
452CKSUMS+= 4493317993af390d8aafc2cb7ace4c349dfc9d2451fd666844f04a4fa1f47442 
453CKSUMS+= 537a01c3cd5507f493616193991e1135c7896aae3fc92d98ec9facbfe243d980 
454CKSUMS+= 6442ed05eb390d44a03daa9800af1030f2ee3e61db98675262c227b28de51937 
455CKSUMS+= ec554c837999c718786debfcfe2241984193751fcd52156323b418d96319aa95 
456 447
457CKSUM_CRATES+= vendor/libc-0.2.146 448CKSUM_CRATES+= vendor/cc
458#CKSUMS+= 6442ed05eb390d44a03daa9800af1030f2ee3e61db98675262c227b28de51937 449CKSUMS+= 17a4659710aa290c4ed9c23063c7b202c5bcf2a84de33aa1f01fc6fded69a1f8
459#CKSUMS+= ec554c837999c718786debfcfe2241984193751fcd52156323b418d96319aa95 450CKSUMS+= a19bcb1a561d4ba5846f8f89fcfe6f05a3cb2e79baf8f21f53f0fba012db1b7f
460#CKSUMS+= 6a60a542639528a0a34b9c9a7298973ec2cf1449c59546b7b30dcef6c51874dd 
461#CKSUMS+= ec1cb2b8522ce7d35c9fce2f5b17a1a7e28cae9836f1cf11e267f222b72dff60 
462 451
463CKSUM_CRATES+= vendor/lzma-sys 452CKSUM_CRATES+= vendor/lzma-sys
464CKSUMS+= 6fd5e9245db34c6f557b8bfcaf03db82fc88c3b06dbfbb5f03b2bcd138983ef9 453CKSUMS+= 6fd5e9245db34c6f557b8bfcaf03db82fc88c3b06dbfbb5f03b2bcd138983ef9
465CKSUMS+= 5e252578b5d266f6a4c8dc9f71ca7a91536ccb8c5c7d7753b82f12ec886459ef 454CKSUMS+= 5e252578b5d266f6a4c8dc9f71ca7a91536ccb8c5c7d7753b82f12ec886459ef
466 455
467CKSUM_CRATES+= vendor/stacker 456CKSUM_CRATES+= vendor/stacker
468CKSUMS+= 59ca847887cf19387119d18c57f08d5a8520d714876ca0142b8f1c001ecde06b 457CKSUMS+= 59ca847887cf19387119d18c57f08d5a8520d714876ca0142b8f1c001ecde06b
469CKSUMS+= 03be8ae293b713fe6e9703e4809dd68caaec992bae6777914ffddae8da2a9bc7 458CKSUMS+= 03be8ae293b713fe6e9703e4809dd68caaec992bae6777914ffddae8da2a9bc7
470 459
471CKSUM_CRATES+= vendor/crossbeam-utils 460CKSUM_CRATES+= vendor/crossbeam-utils
472CKSUMS+= 5f75132808d9e8d6e266fe77f9e20bbc35855a1c37a5dbc0940b3e989bca1a94 461CKSUMS+= 5f75132808d9e8d6e266fe77f9e20bbc35855a1c37a5dbc0940b3e989bca1a94
473CKSUMS+= 3d7c747108434546837b1c5664111c9146fcbfb2e084c95f8ce0be970d652421 462CKSUMS+= 3d7c747108434546837b1c5664111c9146fcbfb2e084c95f8ce0be970d652421
474 463

cvs diff -r1.34 -r1.35 pkgsrc/lang/rust/options.mk (expand / switch to unified diff)

--- pkgsrc/lang/rust/options.mk 2024/01/15 12:24:21 1.34
+++ pkgsrc/lang/rust/options.mk 2024/03/03 14:53:32 1.35
@@ -1,54 +1,60 @@ @@ -1,54 +1,60 @@
1# $NetBSD: options.mk,v 1.34 2024/01/15 12:24:21 adam Exp $ 1# $NetBSD: options.mk,v 1.35 2024/03/03 14:53:32 he Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.rust 3PKG_OPTIONS_VAR= PKG_OPTIONS.rust
4PKG_SUPPORTED_OPTIONS+= rust-cargo-static rust-docs 4PKG_SUPPORTED_OPTIONS+= rust-cargo-static rust-docs
5 5
6.include "../../mk/bsd.fast.prefs.mk" 6.include "../../mk/bsd.fast.prefs.mk"
7 7
8# The bundled LLVM current has issues building on SunOS. 8# The bundled LLVM current has issues building on SunOS.
9.if ${OPSYS} != "SunOS" 9.if ${OPSYS} != "SunOS"
10PKG_SUPPORTED_OPTIONS+= rust-internal-llvm 10PKG_SUPPORTED_OPTIONS+= rust-internal-llvm
11# There may be compatibility issues with the base LLVM on e.g. NetBSD. 11# There may be compatibility issues with the base LLVM on e.g. NetBSD.
12. if !empty(HAVE_LLVM) || ${MACHINE_PLATFORM:MDarwin-*-aarch64} 12. if !empty(HAVE_LLVM) || ${MACHINE_PLATFORM:MDarwin-*-aarch64}
13PKG_SUGGESTED_OPTIONS+= rust-internal-llvm 13PKG_SUGGESTED_OPTIONS+= rust-internal-llvm
14. endif 14. endif
15.endif 15.endif
16 16
17# If cross-building, always use the internal LLVM 17# If cross-building, always use the internal LLVM
18.if !empty(TARGET) 18.if !empty(TARGET)
19PKG_SUGGESTED_OPTIONS+= rust-internal-llvm 19PKG_SUGGESTED_OPTIONS+= rust-internal-llvm
20.endif 20.endif
21 21
22# (NetBSD)/sparc64 systems fail to build libunwind, 22# NetBSD/sparc64 when using the internal LLVM needs
23# a dependency of pkgsrc llvm, so use the internal one instead 23# to not use gcc 10.4 or 10.5 (as found in 10.0_BETA or 10.0), ref.
24.if ${MACHINE_PLATFORM:MNetBSD-*-sparc64} 24# https://github.com/rust-lang/rust/issues/117231
25PKG_SUGGESTED_OPTIONS+= rust-internal-llvm 25# (however, gcc from 9.x produces a working LLVM).
 26.if ${MACHINE_PLATFORM:MNetBSD-10.*-sparc64}
 27. if !empty(PKG_OPTIONS:Mrust-internal-llvm)
 28# Require GCC 12 (from pkgsrc) to correctly build the embedded LLVM (17.x).
 29GCC_REQD= 12
 30. endif
26.endif 31.endif
27 32
28# Bundle OpenSSL and curl into the cargo binary when producing 33# Bundle OpenSSL and curl into the cargo binary when producing
29# bootstraps on NetBSD. 34# bootstraps on NetBSD.
30.if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist" 35.if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist"
31PKG_SUGGESTED_OPTIONS+= rust-cargo-static 36PKG_SUGGESTED_OPTIONS+= rust-cargo-static
32.endif 37.endif
33 38
34PKG_OPTIONS_LEGACY_OPTS+= rust-llvm:rust-internal-llvm 39PKG_OPTIONS_LEGACY_OPTS+= rust-llvm:rust-internal-llvm
35 40
36.include "../../mk/bsd.options.mk" 41.include "../../mk/bsd.options.mk"
37 42
38# 43#
39# Use the internal copy of LLVM or the external one? 44# Use the internal copy of LLVM or the external one?
40# 45#
41.if empty(PKG_OPTIONS:Mrust-internal-llvm) 46.if empty(PKG_OPTIONS:Mrust-internal-llvm)
 47# External LLVM must be >= 15, ref. RELEASES.md
42BUILDLINK_API_DEPENDS.llvm+= llvm>=15 48BUILDLINK_API_DEPENDS.llvm+= llvm>=15
43.include "../../lang/libunwind/buildlink3.mk" 49.include "../../lang/libunwind/buildlink3.mk"
44.include "../../lang/llvm/buildlink3.mk" 50.include "../../lang/llvm/buildlink3.mk"
45CONFIGURE_ARGS+= --enable-llvm-link-shared 51CONFIGURE_ARGS+= --enable-llvm-link-shared
46CONFIGURE_ARGS+= --llvm-libunwind=system 52CONFIGURE_ARGS+= --llvm-libunwind=system
47CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm} 53CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm}
48.endif 54.endif
49 55
50# 56#
51# Link cargo statically against "native" libraries. 57# Link cargo statically against "native" libraries.
52# (openssl and curl specifically). 58# (openssl and curl specifically).
53# 59#
54.if !empty(PKG_OPTIONS:Mrust-cargo-static) 60.if !empty(PKG_OPTIONS:Mrust-cargo-static)

cvs diff -r1.20 -r1.21 pkgsrc/lang/rust/platform.mk (expand / switch to unified diff)

--- pkgsrc/lang/rust/platform.mk 2023/10/25 05:50:43 1.20
+++ pkgsrc/lang/rust/platform.mk 2024/03/03 14:53:32 1.21
@@ -1,26 +1,26 @@ @@ -1,26 +1,26 @@
1# $NetBSD: platform.mk,v 1.20 2023/10/25 05:50:43 pin Exp $ 1# $NetBSD: platform.mk,v 1.21 2024/03/03 14:53:32 he Exp $
2 2
3# This file encodes whether a given platform has support for rust. 3# This file encodes whether a given platform has support for rust.
4 4
5# Platforms where rust ought to work but does not require a link to an 5# Platforms where rust ought to work but does not require a link to an
6# open PR. 6# open PR.
7 7
8.if !defined(PLATFORM_SUPPORTS_RUST) 8.if !defined(PLATFORM_SUPPORTS_RUST)
9 9
10# Rust needs NetBSD>7 10# Rust needs NetBSD>8
11.for rust_arch in aarch64 earmv7hf i386 powerpc riscv64 sparc64 x86_64 11.for rust_arch in aarch64 earmv7hf i386 powerpc riscv64 sparc64 x86_64
12. for rust_os in Darwin FreeBSD Linux NetBSD SunOS 12. for rust_os in Darwin FreeBSD Linux NetBSD SunOS
13. if ${OPSYS} != "NetBSD" || empty(OS_VERSION:M[0-7].*) 13. if ${OPSYS} != "NetBSD" || empty(OS_VERSION:M[0-8].*)
14RUST_PLATFORMS+= ${rust_os}-*-${rust_arch} 14RUST_PLATFORMS+= ${rust_os}-*-${rust_arch}
15. endif 15. endif
16. endfor 16. endfor
17.endfor 17.endfor
18 18
19.for rust_platform in ${RUST_PLATFORMS} 19.for rust_platform in ${RUST_PLATFORMS}
20. if !empty(MACHINE_PLATFORM:M${rust_platform}) 20. if !empty(MACHINE_PLATFORM:M${rust_platform})
21PLATFORM_SUPPORTS_RUST= yes 21PLATFORM_SUPPORTS_RUST= yes
22. endif 22. endif
23.endfor 23.endfor
24PLATFORM_SUPPORTS_RUST?= no 24PLATFORM_SUPPORTS_RUST?= no
25 25
26.endif # !defined(PLATFORM_SUPPORTS_RUST) 26.endif # !defined(PLATFORM_SUPPORTS_RUST)

cvs diff -r1.15 -r1.16 pkgsrc/lang/rust/patches/patch-compiler_rustc__llvm_build.rs (expand / switch to unified diff)

--- pkgsrc/lang/rust/patches/patch-compiler_rustc__llvm_build.rs 2024/01/06 19:00:19 1.15
+++ pkgsrc/lang/rust/patches/patch-compiler_rustc__llvm_build.rs 2024/03/03 14:53:32 1.16
@@ -1,51 +1,49 @@ @@ -1,51 +1,49 @@
1$NetBSD: patch-compiler_rustc__llvm_build.rs,v 1.15 2024/01/06 19:00:19 he Exp $ 1$NetBSD: patch-compiler_rustc__llvm_build.rs,v 1.16 2024/03/03 14:53:32 he Exp $
2 2
3Fix build on NetBSD HEAD-llvm. XXX there is probably a better way to do this. 3Fix build on NetBSD HEAD-llvm. XXX there is probably a better way to do this.
4 4
5Pick up -latomic tweak from 5Pick up -latomic tweak from
6https://github.com/rust-lang/rust/issues/104220 6https://github.com/rust-lang/rust/issues/104220
7and 7and
8https://github.com/rust-lang/rust/pull/104572 8https://github.com/rust-lang/rust/pull/104572
9 9
10--- compiler/rustc_llvm/build.rs.orig 2023-10-03 02:52:17.000000000 +0000 10--- compiler/rustc_llvm/build.rs.orig 2023-10-03 02:52:17.000000000 +0000
11+++ compiler/rustc_llvm/build.rs 11+++ compiler/rustc_llvm/build.rs
12@@ -249,6 +249,10 @@ fn main() { 12@@ -249,6 +249,10 @@ fn main() {
13 { 13 {
14 // 32-bit targets need to link libatomic. 14 // 32-bit targets need to link libatomic.
15 println!("cargo:rustc-link-lib=atomic"); 15 println!("cargo:rustc-link-lib=atomic");
16+ if target.contains("netbsd") 16+ if target.contains("netbsd")
17+ { 17+ {
18+ println!("cargo:rustc-link-lib=z"); 18+ println!("cargo:rustc-link-lib=z");
19+ } 19+ }
20 } else if target.contains("windows-gnu") { 20 } else if target.contains("windows-gnu") {
21 println!("cargo:rustc-link-lib=shell32"); 21 println!("cargo:rustc-link-lib=shell32");
22 println!("cargo:rustc-link-lib=uuid"); 22 println!("cargo:rustc-link-lib=uuid");
23@@ -258,6 +262,14 @@ fn main() { 23@@ -261,7 +265,11 @@ fn main() {
24 { 24 // On NetBSD/i386, gcc and g++ is built for i486 (to maximize backward compat)
25 println!("cargo:rustc-link-lib=z"); 25 // However, LLVM insists on using 64-bit atomics.
26 } else if target.contains("netbsd") { 26 // This gives rise to a need to link rust itself with -latomic for these targets
27+ // When build llvm for i486, and then need -latomic for 64-bit atomics 27- if target.starts_with("i586") || target.starts_with("i686") {
28+ if target.starts_with("i386") 28+ if target.starts_with("i386")
29+ || target.starts_with("i486") 29+ || target.starts_with("i486")
30+ || target.starts_with("i586") 30+ || target.starts_with("i586")
31+ || target.starts_with("i686") 31+ || target.starts_with("i686")
32+ { 32+ {
33+ println!("cargo:rustc-link-lib=atomic"); 33 println!("cargo:rustc-link-lib=atomic");
34+ } 34 }
35 println!("cargo:rustc-link-lib=z"); 35 println!("cargo:rustc-link-lib=z");
36 println!("cargo:rustc-link-lib=execinfo"); 36@@ -352,7 +360,13 @@ fn main() {
37 } 
38@@ -346,7 +358,13 @@ fn main() { 
39 "c++" 37 "c++"
40 } else if target.contains("netbsd") && llvm_static_stdcpp.is_some() { 38 } else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
41 // NetBSD uses a separate library when relocation is required 39 // NetBSD uses a separate library when relocation is required
42- "stdc++_p" 40- "stdc++_p"
43+ if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() { 41+ if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
44+ "c++_pic" 42+ "c++_pic"
45+ } else { 43+ } else {
46+ "stdc++_pic" 44+ "stdc++_pic"
47+ } 45+ }
48+ } else if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() { 46+ } else if env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
49+ "c++" 47+ "c++"
50 } else if llvm_use_libcxx.is_some() { 48 } else if llvm_use_libcxx.is_some() {
51 "c++" 49 "c++"

cvs diff -r1.15 -r1.16 pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mod.rs (expand / switch to unified diff)

--- pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mod.rs 2023/10/25 05:50:43 1.15
+++ pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mod.rs 2024/03/03 14:53:32 1.16
@@ -1,15 +1,14 @@ @@ -1,15 +1,14 @@
1$NetBSD: patch-compiler_rustc__target_src_spec_mod.rs,v 1.15 2023/10/25 05:50:43 pin Exp $ 1$NetBSD: patch-compiler_rustc__target_src_spec_mod.rs,v 1.16 2024/03/03 14:53:32 he Exp $
2 2
3Add i586(pentium) and mipsel NetBSD targets. 3Add entry for NetBSD/mips64el.
4 4
5--- compiler/rustc_target/src/spec/mod.rs.orig 2021-03-23 16:15:10.000000000 +0000 5--- compiler/rustc_target/src/spec/mod.rs.orig 2024-01-13 14:20:59.236278792 +0000
6+++ compiler/rustc_target/src/spec/mod.rs 6+++ compiler/rustc_target/src/spec/mod.rs
7@@ -1324,6 +1324,8 @@ supported_targets! { 7@@ -1532,6 +1532,7 @@ supported_targets! {
8 ("armv6-unknown-netbsd-eabihf", armv6_unknown_netbsd_eabihf), 
9 ("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf), 8 ("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
 9 ("i586-unknown-netbsd", i586_unknown_netbsd),
10 ("i686-unknown-netbsd", i686_unknown_netbsd), 10 ("i686-unknown-netbsd", i686_unknown_netbsd),
11+ ("i586-unknown-netbsd", i586_unknown_netbsd), 11+ ("mips64el-unknown-netbsd", mips64el_unknown_netbsd),
12+ ("mipsel-unknown-netbsd", mipsel_unknown_netbsd), 12 ("mipsel-unknown-netbsd", mipsel_unknown_netbsd),
13 ("powerpc-unknown-netbsd", powerpc_unknown_netbsd), 13 ("powerpc-unknown-netbsd", powerpc_unknown_netbsd),
14 ("riscv64gc-unknown-netbsd", riscv64gc_unknown_netbsd), 14 ("riscv64gc-unknown-netbsd", riscv64gc_unknown_netbsd),
15 ("sparc64-unknown-netbsd", sparc64_unknown_netbsd), 

File Added: pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_base_netbsd.rs
$NetBSD: patch-compiler_rustc__target_src_spec_base_netbsd.rs,v 1.1 2024/03/03 14:53:32 he Exp $

For the benefit of powerpc, when libatomic-links is installed,
search the directory containing the symlinks to -latomic.

--- compiler/rustc_target/src/spec/base/netbsd.rs.orig	2024-01-06 19:57:14.887897867 +0000
+++ compiler/rustc_target/src/spec/base/netbsd.rs
@@ -1,12 +1,23 @@
-use crate::spec::{cvs, RelroLevel, TargetOptions};
+use crate::spec::{cvs, Cc, Lld, RelroLevel, LinkerFlavor, TargetOptions};
 
 pub fn opts() -> TargetOptions {
+    let add_linker_paths =
+        &[
+            // For the benefit of powerpc, when libatomic-links is installed,
+            "-Wl,-R@PREFIX@/lib/libatomic",
+            "-Wl,-L@PREFIX@/lib/libatomic",
+        ];
+    let pre_link_args = TargetOptions::link_args(
+        LinkerFlavor::Gnu(Cc::Yes, Lld::No),
+        add_linker_paths
+    );
     TargetOptions {
         os: "netbsd".into(),
         dynamic_linking: true,
         families: cvs!["unix"],
         no_default_libraries: false,
         has_rpath: true,
+        pre_link_args,
         position_independent_executables: true,
         relro_level: RelroLevel::Full,
         use_ctors_section: true,

File Added: pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_targets_mips64el__unknown__netbsd.rs
$NetBSD: patch-compiler_rustc__target_src_spec_targets_mips64el__unknown__netbsd.rs,v 1.1 2024/03/03 14:53:32 he Exp $

Provide a mips64el target with N32, suitable for NetBSD/mips64el.

--- compiler/rustc_target/src/spec/targets/mips64el_unknown_netbsd.rs.orig	2024-01-13 14:16:30.122042614 +0000
+++ compiler/rustc_target/src/spec/targets/mips64el_unknown_netbsd.rs
@@ -0,0 +1,22 @@
+use crate::abi::Endian;
+use crate::spec::{base, Target, TargetOptions};
+
+pub fn target() -> Target {
+    let mut base = base::netbsd::opts();
+    base.max_atomic_width = Some(32);
+    base.cpu = "mips32".into();
+
+    Target {
+        llvm_target: "mipsel-unknown-netbsd".into(),
+        pointer_width: 32,
+        data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),
+        arch: "mips".into(),
+        options: TargetOptions {
+            abi: "n32".into(),
+            features: "+soft-float,+abi=n32".into(),
+            endian: Endian::Little,
+            mcount: "__mcount".into(),
+            ..base
+        },
+    }
+}

File Added: pkgsrc/lang/rust/patches/patch-src_bootstrap_src_core_build__steps_compile.rs
$NetBSD: patch-src_bootstrap_src_core_build__steps_compile.rs,v 1.1 2024/03/03 14:53:32 he Exp $

On Darwin, do not use @rpath for internal libraries.

--- src/bootstrap/src/core/build_steps/compile.rs.orig	2024-01-06 20:42:20.028206400 +0000
+++ src/bootstrap/src/core/build_steps/compile.rs
@@ -626,7 +626,7 @@ fn copy_sanitizers(
             || target == "x86_64-apple-ios"
         {
             // Update the library’s install name to reflect that it has been renamed.
-            apple_darwin_update_library_name(&dst, &format!("@rpath/{}", &runtime.name));
+            apple_darwin_update_library_name(&dst, &format!("@PREFIX@/lib/{}", &runtime.name));
             // Upon renaming the install name, the code signature of the file will invalidate,
             // so we will sign it again.
             apple_darwin_sign_file(&dst);

File Added: pkgsrc/lang/rust/patches/patch-src_bootstrap_src_core_build__steps_llvm.rs

File Added: pkgsrc/lang/rust/patches/patch-src_bootstrap_src_core_builder.rs
$NetBSD: patch-src_bootstrap_src_core_builder.rs,v 1.1 2024/03/03 14:53:32 he Exp $

Use @PREFIX@, not $ORIGIN in rpath.

--- src/bootstrap/src/core/builder.rs.orig	2024-01-13 20:06:50.748741545 +0000
+++ src/bootstrap/src/core/builder.rs
@@ -1678,7 +1678,7 @@ impl<'a> Builder<'a> {
                 && !target.contains("xous")
             {
                 rustflags.arg("-Clink-args=-Wl,-z,origin");
-                Some(format!("-Wl,-rpath,$ORIGIN/../{libdir}"))
+                Some(format!("-Wl,-rpath,@PREFIX@/{libdir}"))
             } else {
                 None
             };

File Added: pkgsrc/lang/rust/patches/patch-src_bootstrap_src_lib.rs
$NetBSD: patch-src_bootstrap_src_lib.rs,v 1.1 2024/03/03 14:53:32 he Exp $

Don't filter out optimization flags.
FreeBSD has a particular C++ runtime library name

--- src/bootstrap/src/lib.rs.orig	2024-01-06 20:52:50.892941220 +0000
+++ src/bootstrap/src/lib.rs
@@ -1195,13 +1195,13 @@ impl Build {
             .args()
             .iter()
             .map(|s| s.to_string_lossy().into_owned())
-            .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
             .collect::<Vec<String>>();
 
         // If we're compiling C++ on macOS then we add a flag indicating that
         // we want libc++ (more filled out than libstdc++), ensuring that
         // LLVM/etc are all properly compiled.
-        if matches!(c, CLang::Cxx) && target.contains("apple-darwin") {
+        if matches!(c, CLang::Cxx) && 
+            (target.contains("apple-darwin") || target.contains("freebsd")) {
             base.push("-stdlib=libc++".into());
         }
 

File Added: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike+netbsd_mips.rs
$NetBSD: patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike+netbsd_mips.rs,v 1.1 2024/03/03 14:53:33 he Exp $

Add entry for NetBSD/mips.

--- vendor/libc-0.2.148/src/unix/bsd/netbsdlike/netbsd/mips.rs.orig	2024-01-06 21:03:21.781003759 +0000
+++ vendor/libc-0.2.148/src/unix/bsd/netbsdlike/netbsd/mips.rs	2024-01-06 22:27:31.830676317 +0000
@@ -0,0 +1,22 @@
+use PT_FIRSTMACH;
+
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type c_char = i8;
+pub type __cpu_simple_lock_nv_t = ::c_int;
+
+// should be pub(crate), but that requires Rust 1.18.0
+cfg_if! {
+    if #[cfg(libc_const_size_of)] {
+        #[doc(hidden)]
+        pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
+    } else {
+        #[doc(hidden)]
+        pub const _ALIGNBYTES: usize = 8 - 1;
+    }
+}
+
+pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1;
+pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 2;
+pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 3;
+pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 4;

File Added: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike_netbsd_mod.rs
$NetBSD: patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike_netbsd_mod.rs,v 1.1 2024/03/03 14:53:33 he Exp $

Add entries for execinfo, and support
for NetBSD/mips and NetBSD/riscv64.

--- vendor/libc-0.2.148/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig	2024-01-06 22:33:33.911876204 +0000
+++ vendor/libc-0.2.148/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -10,7 +10,7 @@ type __pthread_spin_t = __cpu_simple_loc
 pub type vm_size_t = ::uintptr_t; // FIXME: deprecated since long time
 pub type lwpid_t = ::c_uint;
 pub type shmatt_t = ::c_uint;
-pub type cpuid_t = u64;
+pub type cpuid_t = ::c_ulong;
 pub type cpuset_t = _cpuset;
 pub type pthread_spin_t = ::c_uchar;
 pub type timer_t = ::c_int;
@@ -3153,6 +3153,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;
@@ -3172,6 +3188,12 @@ cfg_if! {
     } else if #[cfg(target_arch = "x86")] {
         mod x86;
         pub use self::x86::*;
+    } else if #[cfg(target_arch = "mips")] {
+        mod mips;
+        pub use self::mips::*;
+    } else if #[cfg(target_arch = "riscv64")] {
+        mod riscv64;
+        pub use self::riscv64::*;
     } else {
         // Unknown target_arch
     }

File Added: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike_netbsd_riscv64.rs
$NetBSD: patch-vendor_libc-0.2.148_src_unix_bsd_netbsdlike_netbsd_riscv64.rs,v 1.1 2024/03/03 14:53:33 he Exp $

Add support for NetBSD/riscv64.

--- vendor/libc-0.2.148/src/unix/bsd/netbsdlike/netbsd/riscv64.rs.orig	2024-01-06 21:03:21.781003759 +0000
+++ vendor/libc-0.2.148/src/unix/bsd/netbsdlike/netbsd/riscv64.rs	2024-01-06 22:31:25.289387359 +0000
@@ -0,0 +1,22 @@
+use PT_FIRSTMACH;
+
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type c_char = u8;
+pub type __cpu_simple_lock_nv_t = ::c_int;
+
+// should be pub(crate), but that requires Rust 1.18.0
+cfg_if! {
+    if #[cfg(libc_const_size_of)] {
+        #[doc(hidden)]
+        pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
+    } else {
+        #[doc(hidden)]
+        pub const _ALIGNBYTES: usize = 8 - 1;
+    }
+}
+
+pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 0;
+pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 1;
+pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 2;
+pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 3;

File Added: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.148_src_unix_solarish_mod.rs
$NetBSD: patch-vendor_libc-0.2.148_src_unix_solarish_mod.rs,v 1.1 2024/03/03 14:53:33 he Exp $

Fix xattr build.

--- vendor/libc-0.2.148/src/unix/solarish/mod.rs.orig	2024-01-06 22:41:58.182128108 +0000
+++ vendor/libc-0.2.148/src/unix/solarish/mod.rs
@@ -1523,6 +1523,8 @@ pub const EOWNERDEAD: ::c_int = 58;
 pub const ENOTRECOVERABLE: ::c_int = 59;
 pub const ENOSTR: ::c_int = 60;
 pub const ENODATA: ::c_int = 61;
+// This is not supported but is required for xattr
+pub const ENOATTR: ::c_int = ::ENODATA;
 pub const ETIME: ::c_int = 62;
 pub const ENOSR: ::c_int = 63;
 pub const ENONET: ::c_int = 64;

File Added: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_mips.rs

File Added: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_mod.rs

File Added: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_bsd_netbsdlike_netbsd_riscv64.rs

File Added: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.149_src_unix_solarish_mod.rs

File Deleted: pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_i586__unknown__netbsd.rs

File Deleted: pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mips64el__unknown__netbsd.rs

File Deleted: pkgsrc/lang/rust/patches/patch-src_bootstrap_llvm.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_mips.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_riscv64.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_riscv64.rs

File Deleted: pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_mipsel__unknown__netbsd.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mips.rs

File Deleted: pkgsrc/lang/rust/patches/patch-compiler_rustc__target_src_spec_netbsd__base.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs

cvs diff -r1.6 -r1.7 pkgsrc/lang/rust/patches/patch-library_backtrace_src_symbolize_gimli_elf.rs (expand / switch to unified diff)

--- pkgsrc/lang/rust/patches/patch-library_backtrace_src_symbolize_gimli_elf.rs 2023/10/25 05:50:43 1.6
+++ pkgsrc/lang/rust/patches/patch-library_backtrace_src_symbolize_gimli_elf.rs 2024/03/03 14:53:32 1.7
@@ -1,24 +1,25 @@ @@ -1,24 +1,25 @@
1$NetBSD: patch-library_backtrace_src_symbolize_gimli_elf.rs,v 1.6 2023/10/25 05:50:43 pin Exp $ 1$NetBSD: patch-library_backtrace_src_symbolize_gimli_elf.rs,v 1.7 2024/03/03 14:53:32 he Exp $
2 2
3Make NetBSD also find its debug libraries, if present. 3Make NetBSD also find its debug libraries, if present.
4 4
5--- library/backtrace/src/symbolize/gimli/elf.rs.orig 2022-04-04 09:41:26.000000000 +0000 5--- library/backtrace/src/symbolize/gimli/elf.rs.orig 2022-04-04 09:41:26.000000000 +0000
6+++ library/backtrace/src/symbolize/gimli/elf.rs 6+++ library/backtrace/src/symbolize/gimli/elf.rs
7@@ -276,11 +276,16 @@ fn decompress_zlib(input: &[u8], output: 7@@ -304,11 +304,17 @@ fn decompress_zlib(input: &[u8], output:
8 } 8 }
9 } 9 }
10  10
11+#[cfg(target_os = "netbsd")] 11+#[cfg(target_os = "netbsd")]
12+const DEBUG_PATH: &[u8] = b"/usr/libdata/debug"; 12+const DEBUG_PATH: &[u8] = b"/usr/libdata/debug";
13+#[cfg(not(target_os = "netbsd"))] 13+#[cfg(not(target_os = "netbsd"))]
14 const DEBUG_PATH: &[u8] = b"/usr/lib/debug"; 14 const DEBUG_PATH: &[u8] = b"/usr/lib/debug";
15  15
16 fn debug_path_exists() -> bool { 16 fn debug_path_exists() -> bool {
17 cfg_if::cfg_if! { 17 cfg_if::cfg_if! {
18- if #[cfg(any(target_os = "freebsd", target_os = "linux"))] { 18- if #[cfg(any(target_os = "freebsd", target_os = "hurd", target_os = "linux"))] {
19+ if #[cfg(any(target_os = "freebsd",  19+ if #[cfg(any(target_os = "freebsd",
20+ target_os = "netbsd", 20+ target_os = "netbsd",
 21+ target_os = "hurd",
21+ target_os = "linux"))] { 22+ target_os = "linux"))] {
22 use core::sync::atomic::{AtomicU8, Ordering}; 23 use core::sync::atomic::{AtomicU8, Ordering};
23 static DEBUG_PATH_EXISTS: AtomicU8 = AtomicU8::new(0); 24 static DEBUG_PATH_EXISTS: AtomicU8 = AtomicU8::new(0);
24  25

cvs diff -r1.21 -r1.22 pkgsrc/lang/rust/patches/patch-src_bootstrap_bootstrap.py (expand / switch to unified diff)

--- pkgsrc/lang/rust/patches/patch-src_bootstrap_bootstrap.py 2024/01/06 19:00:19 1.21
+++ pkgsrc/lang/rust/patches/patch-src_bootstrap_bootstrap.py 2024/03/03 14:53:32 1.22
@@ -1,17 +1,18 @@ @@ -1,17 +1,18 @@
1$NetBSD: patch-src_bootstrap_bootstrap.py,v 1.21 2024/01/06 19:00:19 he Exp $ 1$NetBSD: patch-src_bootstrap_bootstrap.py,v 1.22 2024/03/03 14:53:32 he Exp $
2 2
3Use `uname -p` on NetBSD, as that is reliable and sensible there. 3Use `uname -p` on NetBSD, as that is reliable and sensible there.
4Handle earmv[67]hf for NetBSD. 4Handle earmv[67]hf for NetBSD.
 5Also use @PREFIX@ and not $ORIGIN in rpath.
5 6
6--- src/bootstrap/bootstrap.py.orig 2023-07-12 03:32:40.000000000 +0000 7--- src/bootstrap/bootstrap.py.orig 2023-07-12 03:32:40.000000000 +0000
7+++ src/bootstrap/bootstrap.py 8+++ src/bootstrap/bootstrap.py
8@@ -271,6 +271,11 @@ def default_build_triple(verbose): 9@@ -271,6 +271,11 @@ def default_build_triple(verbose):
9 'GNU': 'unknown-hurd', 10 'GNU': 'unknown-hurd',
10 } 11 }
11  12
12+ # For NetBSD, use `uname -p`, as there it is reliable & sensible 13+ # For NetBSD, use `uname -p`, as there it is reliable & sensible
13+ if kernel == 'NetBSD': 14+ if kernel == 'NetBSD':
14+ cputype = subprocess.check_output( 15+ cputype = subprocess.check_output(
15+ ['uname', '-p']).strip().decode(default_encoding) 16+ ['uname', '-p']).strip().decode(default_encoding)
16+ 17+
17 # Consider the direct transformation first and then the special cases 18 # Consider the direct transformation first and then the special cases
@@ -25,13 +26,22 @@ Handle earmv[67]hf for NetBSD. @@ -25,13 +26,22 @@ Handle earmv[67]hf for NetBSD.
25+ elif cputype in {'armv6hf', 'earmv6hf'}: 26+ elif cputype in {'armv6hf', 'earmv6hf'}:
26+ cputype = 'armv6' 27+ cputype = 'armv6'
27+ if kernel == 'unknown-netbsd': 28+ if kernel == 'unknown-netbsd':
28+ kernel += '-eabihf' 29+ kernel += '-eabihf'
29+ elif cputype in {'armv7l', 'earmv7hf', 'armv8l'}: 30+ elif cputype in {'armv7l', 'earmv7hf', 'armv8l'}:
30 cputype = 'armv7' 31 cputype = 'armv7'
31 if kernel == 'linux-android': 32 if kernel == 'linux-android':
32 kernel = 'linux-androideabi' 33 kernel = 'linux-androideabi'
33+ elif kernel == 'unknown-netbsd': 34+ elif kernel == 'unknown-netbsd':
34+ kernel += '-eabihf' 35+ kernel += '-eabihf'
35 else: 36 else:
36 kernel += 'eabihf' 37 kernel += 'eabihf'
37 elif cputype == 'mips': 38 elif cputype == 'mips':
 39@@ -735,7 +746,7 @@ class RustBuild(object):
 40 rpath_entries = [
 41 # Relative default, all binary and dynamic libraries we ship
 42 # appear to have this (even when `../lib` is redundant).
 43- "$ORIGIN/../lib",
 44+ "@PREFIX@/lib",
 45 os.path.join(os.path.realpath(nix_deps_dir), "lib")
 46 ]
 47 patchelf_args = ["--set-rpath", ":".join(rpath_entries)]

File Deleted: pkgsrc/lang/rust/patches/patch-src_bootstrap_builder.rs

File Deleted: pkgsrc/lang/rust/patches/patch-src_bootstrap_compile.rs

File Deleted: pkgsrc/lang/rust/patches/patch-src_bootstrap_lib.rs

cvs diff -r1.12 -r1.13 pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh (expand / switch to unified diff)

--- pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh 2024/01/22 11:00:16 1.12
+++ pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh 2024/03/03 14:53:33 1.13
@@ -1,25 +1,25 @@ @@ -1,25 +1,25 @@
1$NetBSD: patch-src_tools_rust-installer_install-template.sh,v 1.12 2024/01/22 11:00:16 adam Exp $ 1$NetBSD: patch-src_tools_rust-installer_install-template.sh,v 1.13 2024/03/03 14:53:33 he Exp $
2 2
3No logging to 'install.log'. 3No logging to 'install.log'.
4Do not create 'uninstall.sh'. 4Do not create 'uninstall.sh'.
5Do not make file backups (filename.old), so these will not end up in the final package. 5Do not make file backups (filename.old), so these will not end up in the final package.
6 6
7Rewrite to not use a whole lot of subprocesses just for doing 7Rewrite to not use a whole lot of subprocesses just for doing
8pattern matching and substitution in the install phase using "grep" 8pattern matching and substitution in the install phase using "grep"
9and "sed" when shell builtin "case" and "omit shortest match" ops 9and "sed" when shell builtin "case" and "omit shortest match" ops
10should do just fine. 10should do just fine.
11 11
12--- src/tools/rust-installer/install-template.sh.orig 2023-12-04 19:48:34.000000000 +0000 12--- src/tools/rust-installer/install-template.sh.orig 2023-12-21 16:55:28.000000000 +0000
13+++ src/tools/rust-installer/install-template.sh 13+++ src/tools/rust-installer/install-template.sh
14@@ -6,20 +6,12 @@ set -u 14@@ -6,20 +6,12 @@ set -u
15 init_logging() { 15 init_logging() {
16 local _abs_libdir="$1" 16 local _abs_libdir="$1"
17 local _logfile="$_abs_libdir/$TEMPLATE_REL_MANIFEST_DIR/install.log" 17 local _logfile="$_abs_libdir/$TEMPLATE_REL_MANIFEST_DIR/install.log"
18- rm -f "$_logfile" 18- rm -f "$_logfile"
19- need_ok "failed to remove old installation log" 19- need_ok "failed to remove old installation log"
20- touch "$_logfile" 20- touch "$_logfile"
21- need_ok "failed to create installation log" 21- need_ok "failed to create installation log"
22 LOGFILE="$_logfile" 22 LOGFILE="$_logfile"
23 } 23 }
24  24
25 log_line() { 25 log_line() {

cvs diff -r1.12 -r1.13 pkgsrc/lang/rust/patches/patch-vendor_target-lexicon_src_targets.rs (expand / switch to unified diff)

--- pkgsrc/lang/rust/patches/patch-vendor_target-lexicon_src_targets.rs 2023/10/25 05:50:43 1.12
+++ pkgsrc/lang/rust/patches/patch-vendor_target-lexicon_src_targets.rs 2024/03/03 14:53:33 1.13
@@ -1,30 +1,22 @@ @@ -1,30 +1,22 @@
1$NetBSD: patch-vendor_target-lexicon_src_targets.rs,v 1.12 2023/10/25 05:50:43 pin Exp $ 1$NetBSD: patch-vendor_target-lexicon_src_targets.rs,v 1.13 2024/03/03 14:53:33 he Exp $
2 2
3Add aarch64_eb, mipsel and riscv64gc for NetBSD. 3Add aarch64_eb and mipsel for NetBSD.
4 4
5--- vendor/target-lexicon/src/targets.rs.orig 2021-05-03 21:35:46.000000000 +0000 5--- vendor/target-lexicon/src/targets.rs.orig 2021-05-03 21:35:46.000000000 +0000
6+++ vendor/target-lexicon/src/targets.rs 6+++ vendor/target-lexicon/src/targets.rs
7@@ -1357,6 +1357,7 @@ mod tests { 7@@ -1526,6 +1526,7 @@ mod tests {
8 "aarch64-unknown-linux-gnu_ilp32", 8 "aarch64-unknown-linux-gnu_ilp32",
9 "aarch64-unknown-linux-musl", 9 "aarch64-unknown-linux-musl",
10 "aarch64-unknown-netbsd", 10 "aarch64-unknown-netbsd",
11+ "aarch64_be-unknown-netbsd", 11+ "aarch64_be-unknown-netbsd",
12 "aarch64-unknown-none", 12 "aarch64-unknown-none",
13 "aarch64-unknown-none-softfloat", 13 "aarch64-unknown-none-softfloat",
14 "aarch64-unknown-openbsd", 14 "aarch64-unknown-openbsd",
15@@ -1441,6 +1442,7 @@ mod tests { 15@@ -1611,6 +1612,7 @@ mod tests {
16 "mipsel-unknown-linux-gnu", 16 "mipsel-unknown-linux-gnu",
17 "mipsel-unknown-linux-musl", 17 "mipsel-unknown-linux-musl",
18 "mipsel-unknown-linux-uclibc", 18 "mipsel-unknown-linux-uclibc",
19+ "mipsel-unknown-netbsd", 19+ "mipsel-unknown-netbsd",
20 "mipsel-unknown-none", 20 "mipsel-unknown-none",
21 "mipsisa32r6el-unknown-linux-gnu", 21 "mipsisa32r6el-unknown-linux-gnu",
22 "mipsisa32r6-unknown-linux-gnu", 22 "mipsisa32r6-unknown-linux-gnu",
23@@ -1478,6 +1480,7 @@ mod tests { 
24 "riscv64gc-unknown-freebsd", 
25 "riscv64gc-unknown-linux-gnu", 
26 "riscv64gc-unknown-linux-musl", 
27+ "riscv64gc-unknown-netbsd", 
28 "riscv64gc-unknown-none-elf", 
29 "riscv64gc-unknown-openbsd", 
30 "riscv64imac-unknown-none-elf", 

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.138_src_unix_bsd_netbsdlike_netbsd_mod.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_mips.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_mod.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_bsd_netbsdlike_netbsd_riscv64.rs

File Deleted: pkgsrc/lang/rust/patches/patch-vendor_libc-0.2.140_src_unix_solarish_mod.rs

cvs diff -r1.13 -r1.14 pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_solarish_mod.rs (expand / switch to unified diff)

--- pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_solarish_mod.rs 2023/10/25 05:50:43 1.13
+++ pkgsrc/lang/rust/patches/patch-vendor_libc_src_unix_solarish_mod.rs 2024/03/03 14:53:33 1.14
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1$NetBSD: patch-vendor_libc_src_unix_solarish_mod.rs,v 1.13 2023/10/25 05:50:43 pin Exp $ 1$NetBSD: patch-vendor_libc_src_unix_solarish_mod.rs,v 1.14 2024/03/03 14:53:33 he Exp $
2 2
3Fix xattr build. 3Fix xattr build.
4 4
5--- vendor/libc/src/unix/solarish/mod.rs.orig 2019-05-20 13:47:24.000000000 +0000 5--- vendor/libc/src/unix/solarish/mod.rs.orig 2019-05-20 13:47:24.000000000 +0000
6+++ vendor/libc/src/unix/solarish/mod.rs 6+++ vendor/libc/src/unix/solarish/mod.rs
7@@ -1215,6 +1215,8 @@ pub const EOWNERDEAD: ::c_int = 58; 7@@ -1523,6 +1523,8 @@ pub const EOWNERDEAD: ::c_int = 58;
8 pub const ENOTRECOVERABLE: ::c_int = 59; 8 pub const ENOTRECOVERABLE: ::c_int = 59;
9 pub const ENOSTR: ::c_int = 60; 9 pub const ENOSTR: ::c_int = 60;
10 pub const ENODATA: ::c_int = 61; 10 pub const ENODATA: ::c_int = 61;
11+// This is not supported but is required for xattr 11+// This is not supported but is required for xattr
12+pub const ENOATTR: ::c_int = ::ENODATA; 12+pub const ENOATTR: ::c_int = ::ENODATA;
13 pub const ETIME: ::c_int = 62; 13 pub const ETIME: ::c_int = 62;
14 pub const ENOSR: ::c_int = 63; 14 pub const ENOSR: ::c_int = 63;
15 pub const ENONET: ::c_int = 64; 15 pub const ENONET: ::c_int = 64;