Skip to content

Commit 59b661c

Browse files
committed
rust192: Add a package for rust 1.92.0.
Pkgsrc changes: * Update version & checksums. * Adapt openssl-src patches to minor version update. Noteable failures at the time of commit: * The cross-build for sparc64 fails, not yet reported. Upstream changes relative to 1.91.1: Version 1.92.0 (2025-12-11) ========================== Language -------- - [Document `MaybeUninit` representation and validity] (rust-lang/rust#140463) - [Allow `&raw [mut | const]` for union field in safe code] (rust-lang/rust#141469) - [Prefer item bounds of associated types over where-bounds for auto-traits and `Sized`] (rust-lang/rust#144064) - [Do not materialize `X` in `[X; 0]` when `X` is unsizing a const] (rust-lang/rust#145277) - [Support combining `#[track_caller]` and `#[no_mangle]` (requires every declaration specifying `#[track_caller]` as well)] (rust-lang/rust#145724) - [Make never type lints `never_type_fallback_flowing_into_unsafe` and `dependency_on_unit_never_type_fallback` deny-by-default] (rust-lang/rust#146167) - [Allow specifying multiple bounds for same associated item, except in trait objects] (rust-lang/rust#146593) - [Slightly strengthen higher-ranked region handling in coherence] (rust-lang/rust#146725) - [The `unused_must_use` lint no longer warns on `Result<(), Uninhabited>` (for instance, `Result<(), !>`), or `ControlFlow<Uninhabited, ()>`](rust-lang/rust#147382). This avoids having to check for an error that can never happen. Compiler -------- - [Make `mips64el-unknown-linux-muslabi64` link dynamically] (rust-lang/rust#146858) - [Remove current code for embedding command-line args in PDB] (rust-lang/rust#147022) Command-line information is typically not needed by debugging tools, and the removed code was causing problems for incremental builds even on targets that don't use PDB debuginfo. Libraries --------- - [Specialize `Iterator::eq{_by}` for `TrustedLen` iterators] (rust-lang/rust#137122) - [Simplify `Extend` for tuples] (rust-lang/rust#138799) - [Added details to `Debug` for `EncodeWide`] (rust-lang/rust#140153). - [`iter::Repeat::last`] (rust-lang/rust#147258) and [`count`] (rust-lang/rust#146410) will now panic, rather than looping infinitely. Stabilized APIs --------------- - [`NonZero<u{N}>::div_ceil`] (https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.div_ceil) - [`Location::file_as_c_str`] (https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.file_as_c_str) - [`RwLockWriteGuard::downgrade`] (https://doc.rust-lang.org/stable/std/sync/struct.RwLockWriteGuard.html#method.downgrade) - [`Box::new_zeroed`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_zeroed) - [`Box::new_zeroed_slice`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_zeroed_slice) - [`Rc::new_zeroed`] (https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_zeroed) - [`Rc::new_zeroed_slice`] (https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_zeroed_slice) - [`Arc::new_zeroed`] (https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_zeroed) - [`Arc::new_zeroed_slice`] (https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_zeroed_slice) - [`btree_map::Entry::insert_entry`] (https://doc.rust-lang.org/stable/std/collections/btree_map/enum.Entry.html#method.insert_entry) - [`btree_map::VacantEntry::insert_entry`] (https://doc.rust-lang.org/stable/std/collections/btree_map/struct.VacantEntry.html#method.insert_entry) - [`impl Extend<proc_macro::Group> for proc_macro::TokenStream`] (https://doc.rust-lang.org/stable/proc_macro/struct.TokenStream.html#impl-Extend%3CGroup%3E-for-TokenStream) - [`impl Extend<proc_macro::Literal> for proc_macro::TokenStream`] (https://doc.rust-lang.org/stable/proc_macro/struct.TokenStream.html#impl-Extend%3CLiteral%3E-for-TokenStream) - [`impl Extend<proc_macro::Punct> for proc_macro::TokenStream`] (https://doc.rust-lang.org/stable/proc_macro/struct.TokenStream.html#impl-Extend%3CPunct%3E-for-TokenStream) - [`impl Extend<proc_macro::Ident> for proc_macro::TokenStream`] (https://doc.rust-lang.org/stable/proc_macro/struct.TokenStream.html#impl-Extend%3CIdent%3E-for-TokenStream) These previously stable APIs are now stable in const contexts: - [`<[_]>::rotate_left`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.rotate_left) - [`<[_]>::rotate_right`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.rotate_right) Cargo ----- - [Added a new chapter] (rust-lang/cargo#16119) to the Cargo book, ["Optimizing Build Performance"] (https://doc.rust-lang.org/stable/cargo/guide/build-performance.html). Rustdoc ----- - [If a trait item appears in rustdoc search, hide the corresponding impl items](rust-lang/rust#145898). Previously a search for "last" would show both `Iterator::last` as well as impl methods like `std::vec::IntoIter::last`. Now these impl methods will be hidden, freeing up space for inherent methods like `BTreeSet::last`. - [Relax rules for identifiers in search] (rust-lang/rust#147860). Previously you could only search for identifiers that were valid in rust code, now searches only need to be valid as part of an identifier. For example, you can now perform a search that starts with a digit. Compatibility Notes ------------------- * [Fix backtraces with `-C panic=abort` on Linux by generating unwind tables by default] (rust-lang/rust#143613). Build with `-C force-unwind-tables=no` to keep omitting unwind tables. - As part of the larger effort refactoring compiler built-in attributes and their diagnostics, [the future-compatibility lint `invalid_macro_export_arguments` is upgraded to deny-by-default and will be reported in dependencies too.] (rust-lang/rust#143857) - [Update the minimum external LLVM to 20] (rust-lang/rust#145071) - [Prevent downstream `impl DerefMut for Pin<LocalType>`] (rust-lang/rust#145608) - [Don't apply temporary lifetime extension rules to the arguments of non-extended `pin!` and formatting macros] (rust-lang/rust#145838)
1 parent e650260 commit 59b661c

File tree

78 files changed

+4087
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4087
-0
lines changed

rust192/DESCR

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Rust is a systems programming language focused on three goals: safety,
2+
speed, and concurrency. It maintains these goals without having a
3+
garbage collector, making it a useful language for a number of use cases
4+
other languages aren't good at: embedding in other languages, programs
5+
with specific space and time requirements, and writing low-level code,
6+
like device drivers and operating systems.
7+
8+
It improves on current languages targeting this space by having a number
9+
of compile-time safety checks that produce no runtime overhead, while
10+
eliminating all data races. Rust also aims to achieve "zero-cost
11+
abstractions" even though some of these abstractions feel like those of
12+
a high-level language. Even then, Rust still allows precise control
13+
like a low-level language would.

rust192/HOWTO-BOOTSTRAP

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
How to build a rust bootstrap kit using pkgsrc
2+
----------------------------------------------
3+
4+
A rust bootstrap kit is simply a pre-compiled binary of rust and
5+
the rust standard library, and contains the "rust" and "rust-std"
6+
build results, found in
7+
8+
work/rustc-<version>/build/dist/
9+
as
10+
rust-<version>-<target>.tar.xz
11+
and
12+
rust-std-<version>-<target>.tar.xz
13+
14+
These result files are produced when the "dist" build target is
15+
used, ref. BUILD_TARGET. For a normal native build of the rust
16+
pkgsrc package, the default BUILD_TARGET is "build", not "dist".
17+
18+
There are two possible ways to produce a bootstrap kit:
19+
20+
1) a native build. This requires minimum preparation, except
21+
possibly for setting rust.BUILD_TARGET to "dist" via e.g.
22+
/etc/mk.conf. Note that on NetBSD, using the "BUILD_TARGET" ==
23+
"dist" results in the "rust-cargo-static" option being set, ref.
24+
options.mk. This is so that the resulting bootstrap kits are
25+
built with mostly-static linking, reducing the run-time dependencies
26+
of the bootstrap kits.
27+
28+
2) a cross-build. This requires a bit of preparation:
29+
30+
For each target you want to cross-build rust for, you need
31+
- the cross toolchain resulting from "build.sh tools" for
32+
the intended target
33+
- an OS distribution extracted, including the comp.tgz
34+
set so that the target's include files can be used
35+
- for 32-bit ports, the "libatomic" package needs to be
36+
available. I'm sure there's a clever and long-winded
37+
use of pkg_install which can be used to effect this;
38+
I on my hand have always just extracted the tgz file
39+
and done the minimal cleanup of the "cruft" files
40+
which are part of the package meta-data.
41+
- Pick a root directory for the target, e.g. /u/i386.
42+
Below this directory place the "tools" containing
43+
the cross-compiler in a "tools" sub-directory.
44+
Similarly, the extracted OS distribution in the "dest"
45+
sub-directory.
46+
47+
There are two methods available for doing the cross-compile:
48+
49+
a) Using the "cross.mk" file. For an i386 build against i586, the
50+
following settings should be active:
51+
52+
CROSS_ROOT= /u/i386
53+
MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
54+
GNU_CROSS_TARGET= i486--netbsdelf
55+
MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
56+
TARGET= i586-unknown-netbsd
57+
SCRIPTS= ${WRKDIR}/scripts
58+
CONFIGURE_ARGS+= --host=${TARGET}
59+
CONFIGURE_ARGS+= --target=${TARGET}
60+
CONFIGURE_ARGS+= --set=target.${TARGET}.cc=${SCRIPTS}/gcc-wrap
61+
CONFIGURE_ARGS+= --set=target.${TARGET}.cxx=${SCRIPTS}/c++-wrap
62+
CONFIGURE_ARGS+= --set=target.${TARGET}.linker=${SCRIPTS}/gcc-wrap
63+
CONFIGURE_ARGS+= --set=target.${TARGET}.ar=${CROSS_ROOT}/tools/bin/${GNU_CROSS_TARGET}-ar
64+
65+
Then doing a "make" will cross-build rust, including the LLVM
66+
embedded in the rust distribution, ref. the defaulting of that
67+
option when TARGET is defined ref. options.mk.
68+
69+
Note that when TARGET is set, the default build target for
70+
the rust makefile becomes "dist", so there's no need to set
71+
rust.BUILD_TARGET for cross-builds.
72+
73+
b) Using the "do-cross.mk" Makefile. This will attempt to
74+
cross-build rust for all the targets listed in the SHORT_TARGETS
75+
variable in that file. Overriding the root directories for
76+
the various targets can be done by making your own "local-roots.mk"
77+
file, ref. "do-cross.mk".
78+
79+
This will create a "dist" subdirectory in the rust pkgsrc
80+
directory, and the bootstrap kits for each architecture, plus
81+
the library source kit will be placed in this directory.
82+
83+
The bootstrap kits can then be placed in /usr/pkgsrc/distfiles, and
84+
be used by the "next" rust version, where you can use "make makesum"
85+
to compute the updated checksums for the bootstrap kits.

0 commit comments

Comments
 (0)