Skip to content

Commit 0e9a2a1

Browse files
committed
Add a package for rust version 1.76.0.
Pkgsrc changes: * Adapt checksums and patches. Upstream chnages: Version 1.76.0 (2024-02-08) ========================== Language -------- - [Document Rust ABI compatibility between various types] (rust-lang/rust#115476) - [Also: guarantee that char and u32 are ABI-compatible] (rust-lang/rust#118032) - [Warn against ambiguous wide pointer comparisons] (rust-lang/rust#117758) Compiler -------- - [Lint pinned `#[must_use]` pointers (in particular, `Box<T>` where `T` is `#[must_use]`) in `unused_must_use`.] (rust-lang/rust#118054) - [Soundness fix: fix computing the offset of an unsized field in a packed struct] (rust-lang/rust#118540) - [Soundness fix: fix dynamic size/align computation logic for packed types with dyn Trait tail] (rust-lang/rust#118538) - [Add `$message_type` field to distinguish json diagnostic outputs] (rust-lang/rust#115691) - [Enable Rust to use the EHCont security feature of Windows] (rust-lang/rust#118013) - [Add tier 3 {x86_64,i686}-win7-windows-msvc targets] (rust-lang/rust#118150) - [Add tier 3 aarch64-apple-watchos target] (rust-lang/rust#119074) - [Add tier 3 arm64e-apple-ios & arm64e-apple-darwin targets] (rust-lang/rust#115526) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries --------- - [Add a column number to `dbg!()`] (rust-lang/rust#114962) - [Add `std::hash::{DefaultHasher, RandomState}` exports] (rust-lang/rust#115694) - [Fix rounding issue with exponents in fmt] (rust-lang/rust#116301) - [Add T: ?Sized to `RwLockReadGuard` and `RwLockWriteGuard`'s Debug impls.] (rust-lang/rust#117138) - [Windows: Allow `File::create` to work on hidden files] (rust-lang/rust#116438) Stabilized APIs --------------- - [`Arc::unwrap_or_clone`] (https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.unwrap_or_clone) - [`Rc::unwrap_or_clone`] (https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.unwrap_or_clone) - [`Result::inspect`] (https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.inspect) - [`Result::inspect_err`] (https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.inspect_err) - [`Option::inspect`] (https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.inspect) - [`type_name_of_val`] (https://doc.rust-lang.org/stable/std/any/fn.type_name_of_val.html) - [`std::hash::{DefaultHasher, RandomState}`] (https://doc.rust-lang.org/stable/std/hash/index.html#structs) These were previously available only through `std::collections::hash_map`. - [`ptr::{from_ref, from_mut}`] (https://doc.rust-lang.org/stable/std/ptr/fn.from_ref.html) - [`ptr::addr_eq`](https://doc.rust-lang.org/stable/std/ptr/fn.addr_eq.html) Cargo ----- See [Cargo release notes] (https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-176-2024-02-08). Rustdoc ------- - [Don't merge cfg and doc(cfg) attributes for re-exports] (rust-lang/rust#113091) - [rustdoc: allow resizing the sidebar / hiding the top bar] (rust-lang/rust#115660) - [rustdoc-search: add support for traits and associated types] (rust-lang/rust#116085) - [rustdoc: Add highlighting for comments in items declaration] (rust-lang/rust#117869) Compatibility Notes ------------------- - [Add allow-by-default lint for unit bindings] (rust-lang/rust#112380) This is expected to be upgraded to a warning by default in a future Rust release. Some macros emit bindings with type `()` with user-provided spans, which means that this lint will warn for user code. - [Remove x86_64-sun-solaris target.] (rust-lang/rust#118091) - [Remove asmjs-unknown-emscripten target] (rust-lang/rust#117338) - [Report errors in jobserver inherited through environment variables] (rust-lang/rust#113730) This [may warn](rust-lang/rust#120515) on benign problems too. - [Update the minimum external LLVM to 16.] (rust-lang/rust#117947) - [Improve `print_tts`](rust-lang/rust#114571) This change can break some naive manual parsing of token trees in proc macro code which expect a particular structure after `.to_string()`, rather than just arbitrary Rust code. - [Make `IMPLIED_BOUNDS_ENTAILMENT` into a hard error from a lint] (rust-lang/rust#117984) - [Vec's allocation behavior was changed when collecting some iterators] (rust-lang/rust#110353) Allocation behavior is currently not specified, nevertheless changes can be surprising. See [`impl FromIterator for Vec`] (https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#impl-FromIterator%3CT%3E-for-Vec%3CT%3E) for more details. - [Properly reject `default` on free const items] (rust-lang/rust#117818)
1 parent ee7b4b4 commit 0e9a2a1

File tree

59 files changed

+2944
-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.

59 files changed

+2944
-0
lines changed

rust176/DESCR

+13
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.

rust176/HOWTO-BOOTSTRAP

+85
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)