Skip to content

Commit e762eaa

Browse files
committed
rust178: Add a package for rust version 1.78.0.
Pkgsrc changes: * Adapt checksums and patches, some have beene intregrated upstream. Upstream chnages: Version 1.78.0 (2024-05-02) =========================== Language -------- - [Stabilize `#[cfg(target_abi = ...)]`] (rust-lang/rust#119590) - [Stabilize the `#[diagnostic]` namespace and `#[diagnostic::on_unimplemented]` attribute] (rust-lang/rust#119888) - [Make async-fn-in-trait implementable with concrete signatures] (rust-lang/rust#120103) - [Make matching on NaN a hard error, and remove the rest of `illegal_floating_point_literal_pattern`] (rust-lang/rust#116284) - [static mut: allow mutable reference to arbitrary types, not just slices and arrays] (rust-lang/rust#117614) - [Extend `invalid_reference_casting` to include references casting to bigger memory layout] (rust-lang/rust#118983) - [Add `non_contiguous_range_endpoints` lint for singleton gaps after exclusive ranges] (rust-lang/rust#118879) - [Add `wasm_c_abi` lint for use of older wasm-bindgen versions] (rust-lang/rust#117918) This lint currently only works when using Cargo. - [Update `indirect_structural_match` and `pointer_structural_match` lints to match RFC] (rust-lang/rust#120423) - [Make non-`PartialEq`-typed consts as patterns a hard error] (rust-lang/rust#120805) - [Split `refining_impl_trait` lint into `_reachable`, `_internal` variants] (rust-lang/rust#121720) - [Remove unnecessary type inference when using associated types inside of higher ranked `where`-bounds] (rust-lang/rust#119849) - [Weaken eager detection of cyclic types during type inference] (rust-lang/rust#119989) - [`trait Trait: Auto {}`: allow upcasting from `dyn Trait` to `dyn Auto`] (rust-lang/rust#119338) Compiler -------- - [Made `INVALID_DOC_ATTRIBUTES` lint deny by default] (rust-lang/rust#111505) - [Increase accuracy of redundant `use` checking] (rust-lang/rust#117772) - [Suggest moving definition if non-found macro_rules! is defined later] (rust-lang/rust#121130) - [Lower transmutes from int to pointer type as gep on null] (rust-lang/rust#121282) Target changes: - [Windows tier 1 targets now require at least Windows 10] (rust-lang/rust#115141) - [Enable CMPXCHG16B, SSE3, SAHF/LAHF and 128-bit Atomics in tier 1 Windows] (rust-lang/rust#120820) - [Add `wasm32-wasip1` tier 2 (without host tools) target] (rust-lang/rust#120468) - [Add `wasm32-wasip2` tier 3 target] (rust-lang/rust#119616) - [Rename `wasm32-wasi-preview1-threads` to `wasm32-wasip1-threads`] (rust-lang/rust#122170) - [Add `arm64ec-pc-windows-msvc` tier 3 target] (rust-lang/rust#119199) - [Add `armv8r-none-eabihf` tier 3 target for the Cortex-R52] (rust-lang/rust#110482) - [Add `loongarch64-unknown-linux-musl` tier 3 target] (rust-lang/rust#121832) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries --------- - [Bump Unicode to version 15.1.0, regenerate tables] (rust-lang/rust#120777) - [Make align_offset, align_to well-behaved in all cases] (rust-lang/rust#121201) - [PartialEq, PartialOrd: document expectations for transitive chains] (rust-lang/rust#115386) - [Optimize away poison guards when std is built with panic=abort] (rust-lang/rust#100603) - [Replace pthread `RwLock` with custom implementation] (rust-lang/rust#110211) - [Implement unwind safety for Condvar on all platforms] (rust-lang/rust#121768) - [Add ASCII fast-path for `char::is_grapheme_extended`] (rust-lang/rust#121138) Stabilized APIs --------------- - [`impl Read for &Stdin`] (https://doc.rust-lang.org/stable/std/io/struct.Stdin.html#impl-Read-for-%26Stdin) - [Accept non `'static` lifetimes for several `std::error::Error` related implementations] (rust-lang/rust#113833) - [Make `impl<Fd: AsFd>` impl take `?Sized`] (rust-lang/rust#114655) - [`impl From<TryReserveError> for io::Error`] (https://doc.rust-lang.org/stable/std/io/struct.Error.html#impl-From%3CTryReserveError%3E-for-Error) These APIs are now stable in const contexts: - [`Barrier::new()`] (https://doc.rust-lang.org/stable/std/sync/struct.Barrier.html#method.new) Cargo ----- - [Stabilize lockfile v4](rust-lang/cargo#12852) - [Respect `rust-version` when generating lockfile] (rust-lang/cargo#12861) - [Control `--charset` via auto-detecting config value] (rust-lang/cargo#13337) - [Support `target.<triple>.rustdocflags` officially] (rust-lang/cargo#13197) - [Stabilize global cache data tracking] (rust-lang/cargo#13492) Misc ---- - [rustdoc: add `--test-builder-wrapper` arg to support wrappers such as RUSTC_WRAPPER when building doctests] (rust-lang/rust#114651) Compatibility Notes ------------------- - [Many unsafe precondition checks now run for user code with debug assertions enabled] (rust-lang/rust#120594) This change helps users catch undefined behavior in their code, though the details of how much is checked are generally not stable. - [riscv only supports split_debuginfo=off for now] (rust-lang/rust#120518) - [Consistently check bounds on hidden types of `impl Trait`] (rust-lang/rust#121679) - [Change equality of higher ranked types to not rely on subtyping] (rust-lang/rust#118247) - [When called, additionally check bounds on normalized function return type] (rust-lang/rust#118882) - [Expand coverage for `arithmetic_overflow` lint] (rust-lang/rust#119432) 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. - [Update to LLVM 18](rust-lang/rust#120055) - [Build `rustc` with 1CGU on `x86_64-pc-windows-msvc`] (rust-lang/rust#112267) - [Build `rustc` with 1CGU on `x86_64-apple-darwin`] (rust-lang/rust#112268) - [Introduce `run-make` V2 infrastructure, a `run_make_support` library and port over 2 tests as example] (rust-lang/rust#113026) - [Windows: Implement condvar, mutex and rwlock using futex] (rust-lang/rust#121956)
1 parent ba423a8 commit e762eaa

File tree

57 files changed

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

57 files changed

+2848
-0
lines changed

rust178/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.

rust178/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)