Skip to content

Commit

Permalink
Update lang/rust to version 1.57.0.
Browse files Browse the repository at this point in the history
Pkgsrc changes:
 * Adjust line numbers in a number of patches
 * remove the --disable-dist-src option, so that we produce
   the rust-src rust component, which we upload to LOCALSRC
   to allow the rust-src package to build, which is needed
   for rust-analyzer.
 * Cargo checksum for vendor/cc no longer needs patching;
   checksum for vendor/libc updated

Upstream changes:

Version 1.57.0 (2021-12-02)
==========================

Language
--------

- [Macro attributes may follow `#[derive]` and will see the original
  (pre-`cfg`) input.][87220]
- [Accept curly-brace macros in expressions, like `m!{ .. }.method()`
  and `m!{ .. }?`.][88690]
- [Allow panicking in constant evaluation.][89508]

Compiler
--------

- [Create more accurate debuginfo for vtables.][89597]
- [Add `armv6k-nintendo-3ds` at Tier 3\*.][88529]
- [Add `armv7-unknown-linux-uclibceabihf` at Tier 3\*.][88952]
- [Add `m68k-unknown-linux-gnu` at Tier 3\*.][88321]
- [Add SOLID targets at Tier 3\*:][86191] `aarch64-kmc-solid_asp3`,
  `armv7a-kmc-solid_asp3-eabi`, `armv7a-kmc-solid_asp3-eabihf`

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

Libraries
---------

- [Avoid allocations and copying in `Vec::leak`][89337]
- [Add `#[repr(i8)]` to `Ordering`][89507]
- [Optimize `File::read_to_end` and `read_to_string`][89582]
- [Update to Unicode 14.0][89614]
- [Many more functions are marked `#[must_use]`][89692], producing a warning
  when ignoring their return value. This helps catch mistakes such as expecting
  a function to mutate a value in place rather than return a new value.

Stabilised APIs
---------------

- [`[T; N]::as_mut_slice`][`array::as_mut_slice`]
- [`[T; N]::as_slice`][`array::as_slice`]
- [`collections::TryReserveError`]
- [`HashMap::try_reserve`]
- [`HashSet::try_reserve`]
- [`String::try_reserve`]
- [`String::try_reserve_exact`]
- [`Vec::try_reserve`]
- [`Vec::try_reserve_exact`]
- [`VecDeque::try_reserve`]
- [`VecDeque::try_reserve_exact`]
- [`Iterator::map_while`]
- [`iter::MapWhile`]
- [`proc_macro::is_available`]
- [`Command::get_program`]
- [`Command::get_args`]
- [`Command::get_envs`]
- [`Command::get_current_dir`]
- [`CommandArgs`]
- [`CommandEnvs`]

These APIs are now usable in const contexts:

- [`hint::unreachable_unchecked`]

Cargo
-----

- [Stabilize custom profiles][cargo/9943]

Compatibility notes
-------------------

Internal changes
----------------
These changes provide no direct user facing benefits, but represent significant
improvements to the internals and overall performance of rustc
and related tools.

- [Added an experimental backend for codegen with `libgccjit`.][87260]

[86191]: rust-lang/rust#86191
[87220]: rust-lang/rust#87220
[87260]: rust-lang/rust#87260
[88243]: rust-lang/rust#88243
[88321]: rust-lang/rust#88321
[88529]: rust-lang/rust#88529
[88690]: rust-lang/rust#88690
[88952]: rust-lang/rust#88952
[89337]: rust-lang/rust#89337
[89507]: rust-lang/rust#89507
[89508]: rust-lang/rust#89508
[89582]: rust-lang/rust#89582
[89597]: rust-lang/rust#89597
[89614]: rust-lang/rust#89614
[89692]: rust-lang/rust#89692
[cargo/9943]: rust-lang/cargo#9943
[`array::as_mut_slice`]: https://doc.rust-lang.org/std/primitive.array.html#method.as_mut_slice
[`array::as_slice`]: https://doc.rust-lang.org/std/primitive.array.html#method.as_slice
[`collections::TryReserveError`]: https://doc.rust-lang.org/std/collections/struct.TryReserveError.html
[`HashMap::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.try_reserve
[`HashSet::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html#method.try_reserve
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve_exact
[`Vec::try_reserve`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve
[`Vec::try_reserve_exact`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve_exact
[`VecDeque::try_reserve`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve
[`VecDeque::try_reserve_exact`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve_exact
[`Iterator::map_while`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.map_while
[`iter::MapWhile`]: https://doc.rust-lang.org/std/iter/struct.MapWhile.html
[`proc_macro::is_available`]: https://doc.rust-lang.org/proc_macro/fn.is_available.html
[`Command::get_program`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_program
[`Command::get_args`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_args
[`Command::get_envs`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_envs
[`Command::get_current_dir`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_current_dir
[`CommandArgs`]: https://doc.rust-lang.org/std/process/struct.CommandArgs.html
[`CommandEnvs`]: https://doc.rust-lang.org/std/process/struct.CommandEnvs.html
  • Loading branch information
he32 committed Jan 21, 2022
1 parent 3c27967 commit 0fbc1a0
Show file tree
Hide file tree
Showing 23 changed files with 204 additions and 207 deletions.
48 changes: 23 additions & 25 deletions lang/rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.248 2021/12/08 16:05:23 adam Exp $
# $NetBSD: Makefile,v 1.249 2022/01/21 23:20:36 he Exp $

DISTNAME= rustc-1.56.1-src
DISTNAME= rustc-1.57.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 @@ -43,7 +42,6 @@ CONFIGURE_ARGS+= --enable-extended # Build and install cargo too.
CONFIGURE_ARGS+= --enable-rpath
CONFIGURE_ARGS+= --disable-codegen-tests
CONFIGURE_ARGS+= --disable-compiler-docs
CONFIGURE_ARGS+= --disable-dist-src
CONFIGURE_ARGS+= --disable-llvm-static-stdcpp
CONFIGURE_ARGS+= --disable-ninja

Expand Down Expand Up @@ -175,55 +173,55 @@ BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags
DISTFILES:= ${DEFAULT_DISTFILES}

.if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-aarch64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-earmv6hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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 @@ -236,7 +234,7 @@ pre-build-fix:
# 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.55.0
RUST_STAGE0_VER= 1.56.0
RUST_ARCH:= x86_64-unknown-illumos
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
SITES.${RUST_STAGE0}= https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
Expand All @@ -250,15 +248,15 @@ CONFIGURE_ARGS+= --target=${RUST_ARCH}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
RUST_ARCH= i586-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
Expand All @@ -276,15 +274,15 @@ pre-build-fix:
${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.55.0
RUST_STAGE0_VER= 1.56.1
RUST_ARCH= x86_64-unknown-netbsd
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}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
RUST_ARCH= powerpc-unknown-netbsd

# Cross-built against NetBSD 9.0
Expand All @@ -308,7 +306,7 @@ SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
RUST_ARCH= aarch64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
Expand All @@ -318,7 +316,7 @@ SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64eb) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
RUST_ARCH= aarch64_be-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
Expand All @@ -328,7 +326,7 @@ SITES.${RUST_STD_STAGE0}= ${MASTER_SITE_LOCAL:=rust/}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
RUST_ARCH= sparc64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
Expand All @@ -339,7 +337,7 @@ pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH= armv7-unknown-netbsd-eabihf
RUST_STAGE0_VER= 1.55.0
RUST_STAGE0_VER= 1.56.1
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}
Expand Down Expand Up @@ -378,9 +376,9 @@ SUBST_VARS.rpath= PREFIX
# than one substitution entry per file, but are kept separate below to ease
# updating and verification.
#
CKSUM_CRATES+= vendor/cc
CKSUMS+= 6dde684bdcc1bb03a808784ce8ccc0721f53bfdf87b84c607045aada916730ba
CKSUMS+= 1244e301c58e7f693f14ad23b02713cdd38259928a6ca905336891e869e6743e
#CKSUM_CRATES+= vendor/cc
#CKSUMS+= 6dde684bdcc1bb03a808784ce8ccc0721f53bfdf87b84c607045aada916730ba
#CKSUMS+= 1244e301c58e7f693f14ad23b02713cdd38259928a6ca905336891e869e6743e

CKSUM_CRATES+= vendor/rustc-ap-rustc_target
CKSUMS+= 673ac3b6875d487ace59b01725d83d2fab4af60615d1f8edd95bf21295947433
Expand All @@ -395,8 +393,8 @@ CKSUMS+= cee329550bad2ed1182abb71db9c24558a91b12e1eab8d9a48e23b997bb8f04e
CKSUMS+= 79915b243d02df1dc698f5c2de3a9356c6c296d2dedb06d9035dbcc2f8972cf4

CKSUM_CRATES+= vendor/libc
CKSUMS+= a5e87e2197011ceae4d6aa1bc8a16d2e01dd39583448e6809f32ba58143baee9
CKSUMS+= 37f836ea5d2cf334e171b0fc01ac00c7c8ca74f0066d02d22ff15854fe1670ce
CKSUMS+= 080e0cf03b50874ba9d5082b314eabb0d253532dc4b13d8af095a0c78e0fba84
CKSUMS+= 1cca4f6c13bdda567d47ec4c83a1ea90d99dbe95b7de9478705b68630a13a8c7

CKSUM_CRATES+= vendor/openssl-src
CKSUMS+= 65a4daf6f0d6ad80a83d63614288c3a9df9adcebe5f3d7ff2ad34dd3d2c75196
Expand Down
Loading

0 comments on commit 0fbc1a0

Please sign in to comment.