Skip to content

Commit

Permalink
rust: update to version 1.64.0.
Browse files Browse the repository at this point in the history
Pkgsrc changes:
 * This package now contains rust-analyzer, so implicitly
   conflicts with that pkgsrc package.  The same goes for
   the rust-src package.
 * Add NetBSD/arm6 port
 * Add unfinished NetBSD/mipsel port
 * Revert the use of the internal LLVM,
   should now build with the new pkgsrc LLVM (15).
 * Add depndence on compat80 for sparc64 to fix the build
 * Adapt patches
 * Add CHECK_INTERPRETER_SKIP for a few (mostly unused) files.
   (A proper fix may come later.)

Upstream changes:

Version 1.64.0 (2022-09-22)
===========================

Language
--------
- [Unions with mutable references or tuples of allowed types are
  now allowed](rust-lang/rust#97995)

- It is now considered valid to deallocate memory pointed to by a
  shared reference `&T` [if every byte in `T` is inside an
  `UnsafeCell`](rust-lang/rust#98017)

- Unused tuple struct fields are now warned against in an
  allow-by-default lint, [`unused_tuple_struct_fields`]
  (rust-lang/rust#95977), similar to the
  existing warning for unused struct fields. This lint will become
  warn-by-default in the future.

Compiler
--------
- [Add Nintendo Switch as tier 3 target]
  (rust-lang/rust#88991)
  - Refer to Rust's [platform support page][platform-support-doc] for more
    information on Rust's tiered platform support.
- [Only compile `#[used]` as llvm.compiler.used for ELF targets]
  (rust-lang/rust#93718)
- [Add the `--diagnostic-width` compiler flag to define the terminal width.]
  (rust-lang/rust#95635)
- [Add support for link-flavor `rust-lld` for iOS, tvOS and watchOS]
  (rust-lang/rust#98771)

Libraries
---------
- [Remove restrictions on compare-exchange memory ordering.]
  (rust-lang/rust#98383)
- You can now `write!` or `writeln!` into an `OsString`: [Implement
  `fmt::Write` for `OsString`](rust-lang/rust#97915)
- [Make RwLockReadGuard covariant]
  (rust-lang/rust#96820)
- [Implement `FusedIterator` for `std::net::[Into]Incoming`]
  (rust-lang/rust#97300)
- [`impl<T: AsRawFd> AsRawFd for {Arc,Box}<T>`]
  (rust-lang/rust#97437)
- [`ptr::copy` and `ptr::swap` are doing untyped copies]
  (rust-lang/rust#97712)
- [Add cgroupv1 support to `available_parallelism`]
  (rust-lang/rust#97925)
- [Mitigate many incorrect uses of `mem::uninitialized`]
  (rust-lang/rust#99182)

Stabilized APIs
---------------
- [`future::IntoFuture`]
  (https://doc.rust-lang.org/stable/std/future/trait.IntoFuture.html)
- [`future::poll_fn`]
  (https://doc.rust-lang.org/stable/std/future/fn.poll_fn.html)
- [`task::ready!`]
  (https://doc.rust-lang.org/stable/std/task/macro.ready.html)
- [`num::NonZero*::checked_mul`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_mul)
- [`num::NonZero*::checked_pow`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_pow)
- [`num::NonZero*::saturating_mul`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_mul)
- [`num::NonZero*::saturating_pow`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_pow)
- [`num::NonZeroI*::abs`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.abs)
- [`num::NonZeroI*::checked_abs`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.checked_abs)
- [`num::NonZeroI*::overflowing_abs`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.overflowing_abs)
- [`num::NonZeroI*::saturating_abs`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.saturating_abs)
- [`num::NonZeroI*::unsigned_abs`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.unsigned_abs)
- [`num::NonZeroI*::wrapping_abs`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroIsize.html#method.wrapping_abs)
- [`num::NonZeroU*::checked_add`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_add)
- [`num::NonZeroU*::checked_next_power_of_two`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.checked_next_power_of_two)
- [`num::NonZeroU*::saturating_add`]
  (https://doc.rust-lang.org/stable/std/num/struct.NonZeroUsize.html#method.saturating_add)
- [`os::unix::process::CommandExt::process_group`]
  (https://doc.rust-lang.org/stable/std/os/unix/process/trait.CommandExt.html#tymethod.process_group)
- [`os::windows::fs::FileTypeExt::is_symlink_dir`]
  (https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTypeExt.html#tymethod.is_symlink_dir)
- [`os::windows::fs::FileTypeExt::is_symlink_file`]
  (https://doc.rust-lang.org/stable/std/os/windows/fs/trait.FileTypeExt.html#tymethod.is_symlink_file)

These types were previously stable in `std::ffi`, but are now also
available in `core` and `alloc`:

- [`core::ffi::CStr`]
  (https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html)
- [`core::ffi::FromBytesWithNulError`]
  (https://doc.rust-lang.org/stable/core/ffi/struct.FromBytesWithNulError.html)
- [`alloc::ffi::CString`]
  (https://doc.rust-lang.org/stable/alloc/ffi/struct.CString.html)
- [`alloc::ffi::FromVecWithNulError`]
  (https://doc.rust-lang.org/stable/alloc/ffi/struct.FromVecWithNulError.html)
- [`alloc::ffi::IntoStringError`]
  (https://doc.rust-lang.org/stable/alloc/ffi/struct.IntoStringError.html)
- [`alloc::ffi::NulError`]
  (https://doc.rust-lang.org/stable/alloc/ffi/struct.NulError.html)

These types were previously stable in `std::os::raw`, but are now
also available in `core::ffi` and `std::ffi`:

- [`ffi::c_char`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_char.html)
- [`ffi::c_double`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_double.html)
- [`ffi::c_float`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_float.html)
- [`ffi::c_int`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_int.html)
- [`ffi::c_long`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_long.html)
- [`ffi::c_longlong`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_longlong.html)
- [`ffi::c_schar`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_schar.html)
- [`ffi::c_short`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_short.html)
- [`ffi::c_uchar`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_uchar.html)
- [`ffi::c_uint`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_uint.html)
- [`ffi::c_ulong`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_ulong.html)
- [`ffi::c_ulonglong`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_ulonglong.html)
- [`ffi::c_ushort`]
  (https://doc.rust-lang.org/stable/std/ffi/type.c_ushort.html)

These APIs are now usable in const contexts:

- [`slice::from_raw_parts`]
  (https://doc.rust-lang.org/stable/core/slice/fn.from_raw_parts.html)

Cargo
-----
- [Packages can now inherit settings from the workspace so that
  the settings can be centralized in one place.]
  (rust-lang/cargo#10859) See
  [`workspace.package`](https://doc.rust-lang.org/nightly/cargo/reference/workspaces.html#the-workspacepackage-table)
  and
  [`workspace.dependencies`](https://doc.rust-lang.org/nightly/cargo/reference/workspaces.html#the-workspacedependencies-table)
  for more details on how to define these common settings.
- [Cargo commands can now accept multiple `--target` flags to build
  for multiple targets at once]
  (rust-lang/cargo#10766), and the
  [`build.target`](https://doc.rust-lang.org/nightly/cargo/reference/config.html#buildtarget)
  config option may now take an array of multiple targets.
- [The `--jobs` argument can now take a negative number to count
  backwards from the max CPUs.]
  (rust-lang/cargo#10844)
- [`cargo add` will now update `Cargo.lock`.]
  (rust-lang/cargo#10902)
- [Added](rust-lang/cargo#10838) the
  [`--crate-type`](https://doc.rust-lang.org/nightly/cargo/commands/cargo-rustc.html#option-cargo-rustc---crate-type)
  flag to `cargo rustc` to override the crate type.
- [Significantly improved the performance fetching git dependencies from GitHub
  when using a hash in the `rev` field.]
  (rust-lang/cargo#10079)

Misc
----
- [The `rust-analyzer` rustup component is now available on the stable channel.]
  (rust-lang/rust#98640)

Compatibility Notes
-------------------
- The minimum required versions for all `-linux-gnu` targets are
  now at least kernel 3.2 and glibc 2.17, for targets that previously
  supported older versions: [Increase the minimum linux-gnu
  versions](rust-lang/rust#95026)
- [Network primitives are now implemented with the ideal Rust
  layout, not the C system layout]
  (rust-lang/rust#78802). This can
  cause problems when transmuting the types.
- [Add assertion that `transmute_copy`'s `U` is not larger than `T`]
  (rust-lang/rust#98839)
- [A soundness bug in `BTreeMap` was fixed]
  (rust-lang/rust#99413) that allowed data
  it was borrowing to be dropped before the container.
- [The Drop behavior of C-like enums cast to ints has changed]
  (rust-lang/rust#96862). These are already
  discouraged by a compiler warning.
- [Relate late-bound closure lifetimes to parent fn in NLL]
  (rust-lang/rust#98835)
- [Errors at const-eval time are now in future incompatibility reports]
  (rust-lang/rust#97743)
- On the `thumbv6m-none-eabi` target, some incorrect `asm!` statements
  were erroneously accepted if they used the high registers (r8 to
  r14) as an input/output operand. [This is no longer accepted]
  (rust-lang/rust#99155).
- [`impl Trait` was accidentally accepted as the associated type
  value of return-position `impl Trait`]
  (rust-lang/rust#97346), without
  fulfilling all the trait bounds of that associated type, as long
  as the hidden type satisfies said bounds. This has been fixed.

Internal Changes
----------------

These changes do not affect any public interfaces of Rust, but they
represent significant improvements to the performance or internals
of rustc and related tools.

- Windows builds now use profile-guided optimization, providing
  10-20% improvements to compiler performance: [Utilize PGO for
  windows x64 rustc dist builds]
  (rust-lang/rust#96978)
- [Stop keeping metadata in memory before writing it to disk]
  (rust-lang/rust#96544)
- [compiletest: strip debuginfo by default for mode=ui]
  (rust-lang/rust#98140)
- Many improvements to generated code for derives, including
  performance improvements:
  - [Don't use match-destructuring for derived ops on structs.]
    (rust-lang/rust#98446)
  - [Many small deriving cleanups]
    (rust-lang/rust#98741)
  - [More derive output improvements]
    (rust-lang/rust#98758)
  - [Clarify deriving code](rust-lang/rust#98915)
  - [Final derive output improvements]
    (rust-lang/rust#99046)
  - [Stop injecting `#[allow(unused_qualifications)]` in generated
    `derive` implementations](rust-lang/rust#99485)
  - [Improve `derive(Debug)`](rust-lang/rust#98190)
- [Bump to clap 3](rust-lang/rust#98213)
- [fully move dropck to mir](rust-lang/rust#98641)
- [Optimize `Vec::insert` for the case where `index == len`.]
  (rust-lang/rust#98755)
- [Convert rust-analyzer to an in-tree tool]
  (rust-lang/rust#99603)
  • Loading branch information
he32 committed Nov 15, 2022
1 parent 712a03f commit cc0843c
Show file tree
Hide file tree
Showing 35 changed files with 536 additions and 262 deletions.
141 changes: 107 additions & 34 deletions lang/rust/Makefile
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.272 2022/11/11 17:36:39 he Exp $
# $NetBSD: Makefile,v 1.273 2022/11/15 23:11:14 he Exp $

DISTNAME= rustc-1.63.0-src
DISTNAME= rustc-1.64.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= https://static.rust-lang.org/dist/

Expand Down Expand Up @@ -104,7 +103,9 @@ BUILD_TARGET?= build

.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \
!empty(MACHINE_PLATFORM:MNetBSD-*-earmv[67]hf) || \
!empty(TARGET:Marmv[67]-unknown-netbsd-eabihf)
!empty(MACHINE_PLATFORM:MNetBSD-*-mipsel) || \
!empty(TARGET:Marmv[67]-unknown-netbsd-eabihf) || \
!empty(TARGET:Mmipsel-unknown-netbsd)
# Bootstrapping on NetBSD/powerpc requires no debug-info from rustc
# (both for amd64->powerpc built and powerpc->powerpc built bootstrap bits)
# Also try to downsize the armv[67] build.
Expand All @@ -127,6 +128,34 @@ CONFIGURE_ARGS+= --set llvm.targets="ARM"
.if !empty(TARGET:Marmv[67]-unknown-netbsd-eabihf)
CONFIGURE_ARGS+= --set llvm.targets="ARM;X86"
.endif
# Same for mips:
.if !empty(MACHINE_PLATFORM:MNetBSD-*-mipsel)
CONFIGURE_ARGS+= --set llvm.targets="Mips"
.endif
.if !empty(TARGET:Mmipsel-unknown-netbsd)
CONFIGURE_ARGS+= --set llvm.targets="Mips;X86"
.endif

#REPLACE_SH+= library/backtrace/ci/android-sdk.sh
#REPLACE_SH+= library/backtrace/ci/debuglink.sh
#REPLACE_SH+= library/backtrace/ci/run.sh
#REPLACE_SH+= library/backtrace/ci/run-docker.sh
#REPLACE_SH+= library/stdarch/ci/style.sh
#REPLACE_SH+= library/stdarch/ci/run.sh
#REPLACE_SH+= library/stdarch/ci/run-docker.sh
#REPLACE_SH+= library/stdarch/ci/dox.sh
#
#REPLACE_PYTHON+=library/core/src/unicode/printable.py

CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/backtrace/ci/android-sdk.sh
CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/backtrace/ci/debuglink.sh
CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/backtrace/ci/run.sh
CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/backtrace/ci/run-docker.sh
CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/core/src/unicode/printable.py
CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/stdarch/ci/style.sh
CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/stdarch/ci/run.sh
CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/stdarch/ci/run-docker.sh
CHECK_INTERPRETER_SKIP+=lib/rustlib/src/rust/library/stdarch/ci/dox.sh

.if ${OPSYS} == "NetBSD"
# This block contains information about known trouble on NetBSD and workarounds.
Expand Down Expand Up @@ -187,49 +216,49 @@ BUILDLINK_TRANSFORM+= opt:x86_64:arm64
DISTFILES:= ${DEFAULT_DISTFILES}

.if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= aarch64-apple-darwin
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= x86_64-apple-darwin
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-aarch64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= aarch64-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-earmv6hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= arm-unknown-linux-gnueabihf
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= armv7-unknown-linux-gnueabihf
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= i686-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= x86_64-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
Expand All @@ -241,7 +270,7 @@ DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
# x86_64-sun-solaris bootstrap and comment out the overrides.
#
.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.0
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= x86_64-unknown-illumos
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
SITES.${RUST_STAGE0}= https://us-central.manta.mnx.io/pkgsrc/public/pkg-bootstraps/
Expand All @@ -254,14 +283,14 @@ CONFIGURE_ARGS+= --host=${RUST_ARCH}
CONFIGURE_ARGS+= --target=${RUST_ARCH}
.endif
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH:= x86_64-unknown-freebsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH= i586-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
Expand All @@ -281,14 +310,14 @@ pre-build-fix-paxctl:
${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/rustc
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH= x86_64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH= powerpc-unknown-netbsd

# Cross-built against NetBSD 9.0
Expand All @@ -311,7 +340,7 @@ SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}

.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH= aarch64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
Expand All @@ -320,7 +349,7 @@ SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64eb) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH= aarch64_be-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
Expand All @@ -329,32 +358,41 @@ SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.62.1
RUST_STAGE0_VER= 1.63.0
RUST_ARCH= sparc64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv6hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH= armv6-unknown-netbsd-eabihf
.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH= armv7-unknown-netbsd-eabihf
RUST_STAGE0_VER= 1.63.0
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH= armv7-unknown-netbsd-eabihf
RUST_STAGE0_VER= 1.62.1
.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv6hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH= armv6-unknown-netbsd-eabihf
RUST_STAGE0_VER= 1.63.0
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
.endif
#.if !empty(MACHINE_PLATFORM:MNetBSD-*-mipsel) || make(distinfo) || make (makesum) || make(mdi)
#RUST_ARCH= mipsel-unknown-netbsd
#RUST_STAGE0_VER= 1.63.0
#RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
#RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.xz
#DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
#SITES.${RUST_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
#SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
#.endif

# You may override RUST_BOOTSTRAP_PATH and RUST_ARCH in mk.conf
# if you have a local bootstrap compiler.
Expand Down Expand Up @@ -387,29 +425,61 @@ SUBST_VARS.rpath= PREFIX
# updating and verification.
#

CKSUM_CRATES+= vendor/cc-1.0.69
CKSUMS+= 6dde684bdcc1bb03a808784ce8ccc0721f53bfdf87b84c607045aada916730ba
CKSUMS+= dd09a6ad92c998b3cc15d81b3b56a70544886fe0c22d659406aa25d734fe2fd1
CKSUM_CRATES+= vendor/cc
CKSUMS+= 38970d678de0efb4b5e2978265daa8a613a1db35fc42e669621b03fc56d5b138
CKSUMS+= 1a5dd77a916141a3398372a99278e05cfa9ec9ff56c99325afca6a6b7375c300

CKSUM_CRATES+= vendor/libc
CKSUMS+= 8826303cad14a575fa8189f67c7df52a7e11f8eea0381d7d389ff8206757de9e
CKSUMS+= f79ec5ad2156182d51cf70d80401293da6f8277983dbdedfd2e6927133440e42
CKSUMS+= cb1560bf8ffcc7b2726a27b433efac90e726292960626f3064bd2c6b7f861a55
CKSUMS+= cea54f3eb0929a12fa9c2c07e647343f28fbb6d5394ef0f8e7331959fb540fd3
CKSUMS+= 976b07a13e195840b67c166a62318abfa9ffc8d5ebbb0358f199dd213ec98d1b
CKSUMS+= ee760c856bb491d885e9458fb723c53db7988ba775e59ab5b9ee8be438e69cf4
CKSUMS+= cb1560bf8ffcc7b2726a27b433efac90e726292960626f3064bd2c6b7f861a55
CKSUMS+= 683f56837b31b9f0f5bace3080c5242b86f57f71d1126e352be24af9874ab531
CKSUMS+= b4d5e82df95afc69a931db296be1ef6f40350af60029219587f64ca600f5f53d

CKSUM_CRATES+= vendor/lzma-sys
CKSUMS+= 6fd5e9245db34c6f557b8bfcaf03db82fc88c3b06dbfbb5f03b2bcd138983ef9
CKSUMS+= 5e252578b5d266f6a4c8dc9f71ca7a91536ccb8c5c7d7753b82f12ec886459ef

CKSUM_CRATES+= vendor/cc-1.0.69
CKSUMS+= 6dde684bdcc1bb03a808784ce8ccc0721f53bfdf87b84c607045aada916730ba
CKSUMS+= dd09a6ad92c998b3cc15d81b3b56a70544886fe0c22d659406aa25d734fe2fd1

CKSUM_CRATES+= vendor/stacker
CKSUMS+= cee329550bad2ed1182abb71db9c24558a91b12e1eab8d9a48e23b997bb8f04e
CKSUMS+= 79915b243d02df1dc698f5c2de3a9356c6c296d2dedb06d9035dbcc2f8972cf4

CKSUM_CRATES+= vendor/kqueue
CKSUMS+= 900a966152b8fdccc4e953df94fa27024cb473f57f49df06cd8f2acaac869787
CKSUMS+= 9bf215b1d26d7f12def8cbc3cdc2f89eabe9249f040911c4a44792fb417cc0fd

CKSUM_CRATES+= vendor/crossbeam-utils-0.8.8
CKSUMS+= 71b5f78fd701ce604aa766dd3d825fa5bed774282aae4d6c31d7acb01b1b242f
CKSUMS+= 8fe3bafee993fe92ef421e066b4ed3b75c52efd5f8676b8950d1b868f3a7abba

CKSUM_CRATES+= vendor/crossbeam
CKSUMS+= a2621c1b029c614fb0ab8e3f5cda2e839df88d90d26133181c1b901965f7eec4
CKSUMS+= 1ca104253f186211d88627c66086278adf6cd8e17eaaa243b822106d5e95d637

CKSUM_CRATES+= vendor/crossbeam-utils
CKSUMS+= 916ed15218bb7b75a4e0d432430e7134efd27ca43ca8a8766e0c90e89febb602
CKSUMS+= 9203c99b493cf333be37410484eb3a1d7f9fccf5049aa5fd6fc9b89b20f946ed

CKSUM_CRATES+= vendor/crossbeam-epoch
CKSUMS+= 916ed15218bb7b75a4e0d432430e7134efd27ca43ca8a8766e0c90e89febb602
CKSUMS+= 9203c99b493cf333be37410484eb3a1d7f9fccf5049aa5fd6fc9b89b20f946ed

CKSUM_CRATES+= vendor/crossbeam-queue
CKSUMS+= 71b5f78fd701ce604aa766dd3d825fa5bed774282aae4d6c31d7acb01b1b242f
CKSUMS+= 8fe3bafee993fe92ef421e066b4ed3b75c52efd5f8676b8950d1b868f3a7abba

CKSUM_CRATES+= vendor/crossbeam-epoch-0.9.6
CKSUMS+= 3529c0833bcd1e09a352d3bd1696d3666850c9b09fe2111bf1a783ec16a5f467
CKSUMS+= 67fd5293c2f8d25fd2eaa4694198178c44e46e4db589fbf6f33459b200419e34

CKSUM_CRATES+= vendor/openssl-src
CKSUMS+= 65a4daf6f0d6ad80a83d63614288c3a9df9adcebe5f3d7ff2ad34dd3d2c75196
CKSUMS+= a2fbabba485081fcad2ea712f4c1b38f111ade4c75ca61d3c8579c99aa5a173d
CKSUMS+= 40cd1069246b552b04fcdfd13eb77b3a89194192f18c426b77377a78abbfd72f
CKSUMS+= 0762dfc33f22810157225d9a78415ac3df6a89d589d1937cc58f75a6611e7fc9

SUBST_CLASSES+= cksum
SUBST_STAGE.cksum= pre-configure
Expand Down Expand Up @@ -602,7 +672,8 @@ stage0-bootstrap: install

## Issues specific to: bootstrap AND NetBSD follow

# rust i386 bootstraps are built for 8.0 and still depend on libstdc++.so.8.
# rust i386 and sparc64 bootstraps are built for 8.0
# and still depend on libstdc++.so.8.
# Pull in compat80 on 9.x and newer.
.if (!empty(MACHINE_PLATFORM:MNetBSD-*-i386) || \
!empty(MACHINE_PLATFORM:MNetBSD-*-sparc64)) \
Expand All @@ -613,7 +684,8 @@ BUILD_DEPENDS+= compat80>=0:../../emulators/compat80
.include "../../mk/atomic64.mk"
# This is for when we build natively:
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \
!empty(MACHINE_PLATFORM:MNetBSD-*-i386)
!empty(MACHINE_PLATFORM:MNetBSD-*-i386) || \
!empty(MACHINE_PLATFORM:MNetBSD-*-mipsel)
# Make libatomic library available via a unique directory:
DEPENDS+= libatomic-links>=0:../../devel/libatomic-links
.endif
Expand All @@ -622,4 +694,5 @@ BUILD_DEPENDS+= cmake-[0-9]*:../../devel/cmake
.include "../../devel/cmake/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/python/tool.mk"
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"
7 changes: 5 additions & 2 deletions lang/rust/cross.mk
@@ -1,4 +1,4 @@
# $NetBSD: cross.mk,v 1.8 2022/10/23 14:48:31 he Exp $
# $NetBSD: cross.mk,v 1.9 2022/11/15 23:11:14 he Exp $

# These settings may be used to cross-build rust.
#
Expand All @@ -20,6 +20,7 @@
#CROSS_ROOT= /u/evbarm64
#CROSS_ROOT= /u/evbarm64eb
#CROSS_ROOT= /u/i386
#CROSS_ROOT= /u/mipsel
#CROSS_ROOT= /
#MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}

Expand All @@ -31,20 +32,22 @@
#GNU_CROSS_TARGET= aarch64--netbsd
#GNU_CROSS_TARGET= aarch64_be--netbsd
#GNU_CROSS_TARGET= i486--netbsdelf
#GNU_CROSS_TARGET= mipsel--netbsd
#MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}

# To cross-build rust, you need to specify
# the ultimate target to built for, as well as the
# host the compiler is supposed to run on.
# Rust's target designation
#TARGET= armv7-unknown-netbsd-eabihf
#TARGET= armv6-unknown-netbsd-eabihf
#TARGET= armv6-unknown-netbsd-eabihf
#TARGET= sparc64-unknown-netbsd
#TARGET= powerpc-unknown-netbsd
#TARGET= aarch64-unknown-netbsd
#TARGET= aarch64_be-unknown-netbsd
#TARGET= i686-unknown-netbsd
#TARGET= i586-unknown-netbsd
#TARGET= mipsel-unknown-netbsd
#
#SCRIPTS= ${WRKDIR}/scripts
#CONFIGURE_ARGS+= --host=${TARGET}
Expand Down

0 comments on commit cc0843c

Please sign in to comment.