Skip to content

Commit 39635f8

Browse files
committed
Update lang/rust to version 1.50.0.
Pkgsrc changes: * Adjust patches, re-compute line offsets, fix capitalization. * Remove i686/FreeBSD support, no longer provided upstream. * Bump bootstraps to 1.49.0. * Change USE_TOOLS from bsdtar to gtar. * Reduce diffs to pkgsrc-wip package patches. * Allow rust.BUILD_TARGET to override automatic choice of target. * Add an i586/NetBSD (pentium) bootstrap variant (needs testing), not yet added as bootstrap since 1.49 doesn't have that variant. Upstream changes: Version 1.50.0 (2021-02-11) ============================ Language ----------------------- - [You can now use `const` values for `x` in `[x; N]` array expressions.][79270] This has been technically possible since 1.38.0, as it was unintentionally stabilized. - [Assignments to `ManuallyDrop<T>` union fields are now considered safe.][78068] Compiler ----------------------- - [Added tier 3\* support for the `armv5te-unknown-linux-uclibceabi` target.][78142] - [Added tier 3 support for the `aarch64-apple-ios-macabi` target.][77484] - [The `x86_64-unknown-freebsd` is now built with the full toolset.][79484] \* Refer to Rust's [platform support page][forge-platform-support] for more information on Rust's tiered platform support. Libraries ----------------------- - [`proc_macro::Punct` now implements `PartialEq<char>`.][78636] - [`ops::{Index, IndexMut}` are now implemented for fixed sized arrays of any length.][74989] - [On Unix platforms, the `std::fs::File` type now has a "niche" of `-1`.][74699] This value cannot be a valid file descriptor, and now means `Option<File>` takes up the same amount of space as `File`. Stabilized APIs --------------- - [`bool::then`] - [`btree_map::Entry::or_insert_with_key`] - [`f32::clamp`] - [`f64::clamp`] - [`hash_map::Entry::or_insert_with_key`] - [`Ord::clamp`] - [`RefCell::take`] - [`slice::fill`] - [`UnsafeCell::get_mut`] The following previously stable methods are now `const`. - [`IpAddr::is_ipv4`] - [`IpAddr::is_ipv6`] - [`Layout::size`] - [`Layout::align`] - [`Layout::from_size_align`] - `pow` for all integer types. - `checked_pow` for all integer types. - `saturating_pow` for all integer types. - `wrapping_pow` for all integer types. - `next_power_of_two` for all unsigned integer types. - `checked_power_of_two` for all unsigned integer types. Cargo ----------------------- - [Added the `[build.rustc-workspace-wrapper]` option.][cargo/8976] This option sets a wrapper to execute instead of `rustc`, for workspace members only. - [`cargo:rerun-if-changed` will now, if provided a directory, scan the entire contents of that directory for changes.][cargo/8973] - [Added the `--workspace` flag to the `cargo update` command.][cargo/8725] Misc ---- - [The search results tab and the help button are focusable with keyboard in rustdoc.][79896] - [Running tests will now print the total time taken to execute.][75752] Compatibility Notes ------------------- - [The `compare_and_swap` method on atomics has been deprecated.][79261] It's recommended to use the `compare_exchange` and `compare_exchange_weak` methods instead. - [Changes in how `TokenStream`s are checked have fixed some cases where you could write unhygenic `macro_rules!` macros.][79472] - [`#![test]` as an inner attribute is now considered unstable like other inner macro attributes, and reports an error by default through the `soft_unstable` lint.][79003] - [Overriding a `forbid` lint at the same level that it was set is now a hard error.][78864] - [Dropped support for all cloudabi targets.][78439] - [You can no longer intercept `panic!` calls by supplying your own macro.][78343] It's recommended to use the `#[panic_handler]` attribute to provide your own implementation. - [Semi-colons after item statements (e.g. `struct Foo {};`) now produce a warning.][78296] [74989]: rust-lang/rust#74989 [79261]: rust-lang/rust#79261 [79896]: rust-lang/rust#79896 [79484]: rust-lang/rust#79484 [79472]: rust-lang/rust#79472 [79270]: rust-lang/rust#79270 [79003]: rust-lang/rust#79003 [78864]: rust-lang/rust#78864 [78636]: rust-lang/rust#78636 [78439]: rust-lang/rust#78439 [78343]: rust-lang/rust#78343 [78296]: rust-lang/rust#78296 [78068]: rust-lang/rust#78068 [75752]: rust-lang/rust#75752 [74699]: rust-lang/rust#74699 [78142]: rust-lang/rust#78142 [77484]: rust-lang/rust#77484 [cargo/8976]: rust-lang/cargo#8976 [cargo/8973]: rust-lang/cargo#8973 [cargo/8725]: rust-lang/cargo#8725 [`IpAddr::is_ipv4`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv4 [`IpAddr::is_ipv6`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv6 [`Layout::align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.align [`Layout::from_size_align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.from_size_align [`Layout::size`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.size [`Ord::clamp`]: https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html#method.clamp [`RefCell::take`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.take [`UnsafeCell::get_mut`]: https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.get_mut [`bool::then`]: https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then [`btree_map::Entry::or_insert_with_key`]: https://doc.rust-lang.org/stable/std/collections/btree_map/enum.Entry.html#method.or_insert_with_key [`f32::clamp`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.clamp [`f64::clamp`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.clamp [`hash_map::Entry::or_insert_with_key`]: https://doc.rust-lang.org/stable/std/collections/hash_map/enum.Entry.html#method.or_insert_with_key [`slice::fill`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.fill
1 parent 04b28e8 commit 39635f8

27 files changed

+243
-205
lines changed

lang/rust/Makefile

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# $NetBSD: Makefile,v 1.229 2021/04/16 01:14:37 gutteridge Exp $
1+
# $NetBSD: Makefile,v 1.230 2021/04/19 17:08:09 he Exp $
22

3-
DISTNAME= rustc-1.49.0-src
3+
DISTNAME= rustc-1.50.0-src
44
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
5-
PKGREVISION= 1
65
CATEGORIES= lang
76
MASTER_SITES= https://static.rust-lang.org/dist/
87

@@ -49,11 +48,15 @@ CONFIGURE_ARGS+= --disable-ninja
4948
# Include (optional) settings to cross-build rust
5049
.include "cross.mk"
5150

51+
.if !empty(rust.BUILD_TARGET)
52+
BUILD_TARGET= ${rust.BUILD_TARGET)
53+
.endif
54+
5255
.if !empty(TARGET)
5356
# Use "dist" build target for cross compile of bootstrap
54-
BUILD_TARGET= dist
57+
BUILD_TARGET?= dist
5558
.else
56-
BUILD_TARGET= build
59+
BUILD_TARGET?= build
5760
.endif
5861

5962
# Getting RPATH with $ORIGIN into bootstrap may be troublesome, so
@@ -157,23 +160,23 @@ BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags
157160
DISTFILES:= ${DEFAULT_DISTFILES}
158161

159162
.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
160-
RUST_STAGE0_VER= 1.48.0
163+
RUST_STAGE0_VER= 1.49.0
161164
RUST_ARCH:= x86_64-apple-darwin
162165
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
163166
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
164167
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
165168
pre-build-fix:
166169
.endif
167170
.if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo) || make (makesum) || make(mdi)
168-
RUST_STAGE0_VER= 1.48.0
171+
RUST_STAGE0_VER= 1.49.0
169172
RUST_ARCH:= i686-unknown-linux-gnu
170173
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
171174
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
172175
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
173176
pre-build-fix:
174177
.endif
175178
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
176-
RUST_STAGE0_VER= 1.48.0
179+
RUST_STAGE0_VER= 1.49.0
177180
RUST_ARCH:= x86_64-unknown-linux-gnu
178181
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
179182
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
@@ -186,7 +189,7 @@ pre-build-fix:
186189
# x86_64-sun-solaris bootstrap and comment out the overrides.
187190
#
188191
.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
189-
RUST_STAGE0_VER= 1.48.0
192+
RUST_STAGE0_VER= 1.49.0
190193
RUST_ARCH:= x86_64-unknown-illumos
191194
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
192195
SITES.${RUST_STAGE0}= https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
@@ -199,16 +202,8 @@ CONFIGURE_ARGS+= --host=${RUST_ARCH}
199202
CONFIGURE_ARGS+= --target=${RUST_ARCH}
200203
pre-build-fix:
201204
.endif
202-
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
203-
RUST_STAGE0_VER= 1.48.0
204-
RUST_ARCH:= i686-unknown-freebsd
205-
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
206-
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
207-
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
208-
pre-build-fix:
209-
.endif
210205
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
211-
RUST_STAGE0_VER= 1.48.0
206+
RUST_STAGE0_VER= 1.49.0
212207
RUST_ARCH:= x86_64-unknown-freebsd
213208
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
214209
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
@@ -233,7 +228,7 @@ pre-build-fix:
233228
${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/rustc
234229
.endif
235230
.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
236-
RUST_STAGE0_VER= 1.48.0
231+
RUST_STAGE0_VER= 1.49.0
237232
RUST_ARCH= x86_64-unknown-netbsd
238233
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
239234
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
@@ -343,7 +338,7 @@ CKSUMS+= 9e146a847e1f726fa7d7eae224aaa925030287f99770f950a012cb398e088d12
343338

344339
CKSUM_CRATES+= vendor/openssl-src
345340
CKSUMS+= 03dcdaac7de880b860ecfe859ba2ac3e46c8f46a7bf948aa674147eebee421b0
346-
CKSUMS+= 41ab6811d4ffde68f245e5097081ba8052a07a4b86df69a356ba11205e7e2210
341+
CKSUMS+= 90456c77ade1702fbf116d9cdc57c0c8dba5f059f591d3dffc9b54c7a7088be8
347342

348343
SUBST_CLASSES+= cksum
349344
SUBST_STAGE.cksum= pre-configure
@@ -370,11 +365,13 @@ post-extract:
370365
${RM} -f c++-wrap; \
371366
${RM} -f clang++-wrap; \
372367
${RM} -f clang-wrap; \
368+
${RM} -f ar-wrap; \
373369
${CP} ${.CURDIR}/files/gcc-wrap .; \
374370
${CHMOD} +x gcc-wrap; \
375371
${LN} -s gcc-wrap c++-wrap; \
376372
${LN} -s gcc-wrap clang++-wrap; \
377-
${LN} -s gcc-wrap clang-wrap
373+
${LN} -s gcc-wrap clang-wrap; \
374+
${LN} -s gcc-wrap ar-wrap
378375
.endif
379376

380377
.if ${OPSYS} == "FreeBSD"
@@ -444,7 +441,7 @@ GENERATE_PLIST+= ${FIND} ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \
444441
#BOOTSTRAP_NAME= ${PKGNAME_NOREV:C/rust/rust-nightly/}-${RUST_ARCH}
445442
BOOTSTRAP_NAME= ${PKGNAME_NOREV}-${RUST_ARCH}
446443
BOOTSTRAP_TMPDIR= ${WRKDIR}/${BOOTSTRAP_NAME}
447-
USE_TOOLS+= bsdtar
444+
USE_TOOLS+= gtar
448445

449446
# The NetBSD part is so far untested, because I could not convince
450447
# the rust build to use the gcc wrapper when building natively,

lang/rust/buildlink3.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# $NetBSD: buildlink3.mk,v 1.7 2020/11/13 20:35:58 he Exp $
2-
3-
BUILDLINK_TREE+= rust
1+
# $NetBSD: buildlink3.mk,v 1.8 2021/04/19 17:08:09 he Exp $
42

53
#
64
# DO NOT include this directly! Use rust.mk instead.
75
#
86

7+
BUILDLINK_TREE+= rust
8+
99
.if !defined(RUST_BUILDLINK3_MK)
1010
RUST_BUILDLINK3_MK:=
1111

lang/rust/cross.mk

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: cross.mk,v 1.3 2020/07/16 09:35:37 jperkin Exp $
1+
# $NetBSD: cross.mk,v 1.4 2021/04/19 17:08:09 he Exp $
22

33
# These settings may be used to cross-build rust.
44
#
@@ -18,6 +18,7 @@
1818
#CROSS_ROOT= /u/9.0-macppc
1919
#CROSS_ROOT= /u/evbarm64
2020
#CROSS_ROOT= /u/i386
21+
#CROSS_ROOT= /
2122
#MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
2223

2324
# The GNU cross target designation
@@ -37,14 +38,17 @@
3738
#TARGET= powerpc-unknown-netbsd
3839
#TARGET= aarch64-unknown-netbsd
3940
#TARGET= i686-unknown-netbsd
41+
#TARGET= i586-unknown-netbsd
4042
#
4143
#SCRIPTS= ${WRKDIR}/scripts
4244
#CONFIGURE_ARGS+= --host=${TARGET}
4345
#CONFIGURE_ARGS+= --target=${TARGET}
4446
#CONFIGURE_ARGS+= --set=target.${TARGET}.cc=${SCRIPTS}/gcc-wrap
4547
#CONFIGURE_ARGS+= --set=target.${TARGET}.cxx=${SCRIPTS}/c++-wrap
4648
#CONFIGURE_ARGS+= --set=target.${TARGET}.linker=${SCRIPTS}/gcc-wrap
49+
# Pick one:
4750
#CONFIGURE_ARGS+= --set=target.${TARGET}.ar=${CROSS_ROOT}/tools/bin/${GNU_CROSS_TARGET}-ar
51+
#CONFIGURE_ARGS+= --set=target.${TARGET}.ar=${SCRIPTS}/ar-wrap
4852

4953
# May be required when cross-building on NetBSD
5054
#MAKE_ENV+= OPENSSL_DIR=/usr
@@ -53,15 +57,15 @@
5357
# Cross-compile illumos target. The host is identical, it's just the target
5458
# that is renamed from x86_64-sun-solaris to x86_64-unknown-illumos.
5559
#
56-
#TARGET= x86_64-unknown-illumos
60+
#TARGET= x86_64-unknown-illumos
5761
#
5862
# Use these variables for "cross-compiling" from x86_64-sun-solaris.
5963
#
60-
#CONFIGURE_ARGS+= --set=target.${TARGET}.llvm-config=${LLVM_CONFIG_PATH}
61-
#CONFIGURE_ARGS+= --host=${TARGET}
62-
#CONFIGURE_ARGS+= --target=${TARGET}
64+
#CONFIGURE_ARGS+= --set=target.${TARGET}.llvm-config=${LLVM_CONFIG_PATH}
65+
#CONFIGURE_ARGS+= --host=${TARGET}
66+
#CONFIGURE_ARGS+= --target=${TARGET}
6367
#
6468
# Set this variable when using a native x86_64-unknown-illumos bootstrap, as
6569
# the build still defaults to x86_64-sun-solaris based on uname.
6670
#
67-
#CONFIGURE_ARGS+= --build=${TARGET}
71+
#CONFIGURE_ARGS+= --build=${TARGET}

0 commit comments

Comments
 (0)