The NetBSD Project

CVS log for pkgsrc/lang/rust/files/gcc-wrap

[BACK] Up to [] / pkgsrc / lang / rust / files

Request diff between arbitrary revisions

Default branch: MAIN

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jan 23 18:49:04 2023 UTC (4 months, 2 weeks ago) by he
Branch: MAIN
CVS Tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1, HEAD
Changes since 1.5: +31 -1 lines
Diff to previous 1.5 (colored)

rust: Upgrade to version 1.66.1.

Pkgsrc changes:
 * pkglint cleanups, bump bootstrap kits to 1.65.0.
 * New target: mipsel-unknown-netbsd, for cpu=mips32 with soft-float.
 * Managed to retain the build of aarch64_be, llvm needed a patch to
   avoid use of neon instructions in the BE case (llvm doesn't support
   use of neon in BE mode).  Ref. patch to
   Also submitted upstream of LLVM to the BLAKE3 maintainers.
 * The minimum gcc version is now 7.x, and that includes the
   cross-compiler for the targets.  For i386 this also needs to
   /usr/include/gcc-7 include files in the target root, because
   immintrin.h from gcc 5 is not compatible with gcc 7.x.  This
   applies for the targets where we build against a root from netbsd-8
   (sparc64, powerpc, i386), and files/gcc-wrap gets a hack for this.
 * Pick up tweak for -latomic inclusion from
 * Retain ability to do 32-bit NetBSD, by changing from 64 to 32 bit
   types in library/std/src/sys/unix/thread_parker/
 * I've tried to get the "openssl-src" build with -latomic where it's
   needed.  I've introduced the "NetBSD-generic32" system type and use
   it for the NetBSD mipsel target.  There is another attempt to do
   the same in the patch to vendor/openssl-sys/build/

Upstream changes:

Version 1.66.1 (2023-01-10)

- Added validation of SSH host keys for git URLs in Cargo

Version 1.66.0 (2022-12-15)

- [Permit specifying explicit discriminants on all `repr(Int)`
  enum Foo {
      A(u8) = 0,
      B(i8) = 1,
      C(bool) = 42,
- [Allow transmutes between the same type differing only in
- [Change constant evaluation errors from a deny-by-default lint to a
  hard error](
- [Trigger `must_use` on `impl Trait` for
  supertraits]( This
  makes `impl ExactSizeIterator` respect the existing `#[must_use]`
  annotation on `Iterator`.
- [Allow `..X` and `..=X` in
- [Uplift `clippy::for_loops_over_fallibles` lint into
- [Stabilize `sym` operands in inline
- [Update to Unicode 15](
- [Opaque types no longer imply lifetime
  bounds]( This is a
  soundness fix which may break code that was erroneously relying on this

- [Add armv5te-none-eabi and thumbv5te-none-eabi tier 3
  - Refer to Rust's [platform support page][platform-support-doc] for
    more information on Rust's tiered platform support.
- [Add support for linking against macOS universal

- [Fix `#[derive(Default)]` on a generic `#[default]` enum adding
  unnecessary `Default`
- [Update to Unicode 15](

Stabilized APIs
- [`proc_macro::Span::source_text`](
- [`uX::{checked_add_signed, overflowing_add_signed,
- [`iX::{checked_add_unsigned, overflowing_add_unsigned,
- [`iX::{checked_sub_unsigned, overflowing_sub_unsigned,
- [`BTreeSet::{first, last, pop_first,
- [`BTreeMap::{first_key_value, last_key_value, first_entry, last_entry,
- [Add `AsFd` implementations for stdio lock types on
- [`impl TryFrom<Vec<T>> for Box<[T;
- [`core::hint::black_box`](
- [`Duration::try_from_secs_{f32,f64}`](
- [`Option::unzip`](
- [`std::os::fd`](

- [Add Rustdoc warning for invalid HTML tags in the

- [Added `cargo remove` to remove dependencies from
- [`cargo publish` now waits for the new version to be downloadable
  before exiting](

See [detailed release notes]( for more.

Compatibility Notes
- [Only apply `ProceduralMasquerade` hack to older versions of
- [Don't export `__heap_base` and `__data_end` on
- [Don't export `__wasm_init_memory` on
- [Only export `__tls_*` on
- [Don't link to `libresolv` in libstd on
- [Update libstd's libc to 0.2.135 (to make `libstd` no longer pull in
  `libiconv.dylib` on
- [Opaque types no longer imply lifetime
  This is a soundness fix which may break code that was erroneously
  relying on this behavior.
- [Make `order_dependent_trait_objects` show up in future-breakage
- [Change std::process::Command spawning to default to inheriting the
  parent's signal mask](

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.

- [Enable BOLT for LLVM
- [Enable LTO for](

Version 1.65.0 (2022-11-03)

- [Error on `as` casts of enums with `#[non_exhaustive]` variants]
- [Stabilize `let else`](
- [Stabilize generic associated types (GATs)]
- [Add lints `let_underscore_drop`, `let_underscore_lock`, and
  `let_underscore_must_use` from Clippy]
- [Stabilize `break`ing from arbitrary labeled blocks ("label-break-value")]
- [Uninitialized integers, floats, and raw pointers are now considered
  immediate UB](
  Usage of `MaybeUninit` is the correct way to work with uninitialized
- [Stabilize raw-dylib for Windows x86_64, aarch64, and thumbv7a]
- [Do not allow `Drop` impl on foreign ADTs]

- [Stabilize -Csplit-debuginfo on Linux]
- [Use niche-filling optimization even when multiple variants have
  data] (
- [Associated type projections are now verified to be well-formed
  prior to resolving the underlying type]
- [Stringify non-shorthand visibility correctly]
- [Normalize struct field types when unsizing]
- [Update to LLVM 15](
- [Fix aarch64 call abi to correctly zeroext when needed]
- [debuginfo: Generalize C++-like encoding for enums]
- [Add `special_module_name` lint]
- [Add support for generating unique profraw files by default when
  using `-C instrument-coverage`]
- [Allow dynamic linking for iOS/tvOS targets]

New targets:
- [Add armv4t-none-eabi as a tier 3 target]
- [Add powerpc64-unknown-openbsd and riscv64-unknown-openbsd as tier 3 targets]
- Refer to Rust's [platform support page][platform-support-doc] for more
  information on Rust's tiered platform support.

- [Don't generate `PartialEq::ne` in derive(PartialEq)]
- [Windows RNG: Use `BCRYPT_RNG_ALG_HANDLE` by default]
- [Forbid mixing `System` with direct system allocator calls]
- [Document no support for writing to non-blocking stdio/stderr]
- [`std::layout::Layout` size must not overflow `isize::MAX` when
  rounded up to `align`](
  This also changes the safety conditions on

Stabilized APIs
- [`std::backtrace::Backtrace`]
- [`Bound::as_ref`]
- [`std::io::read_to_string`]
- [`<*const T>::cast_mut`]
- [`<*mut T>::cast_const`]

These APIs are now stable in const contexts:
- [`<*const T>::offset_from`]
- [`<*mut T>::offset_from`]

- [Apply GitHub fast path even for partial hashes]
- [Do not add home bin path to PATH if it's already there]
- [Take priority into account within the pending queue]
  This slightly optimizes job scheduling by Cargo, with typically
  small improvements on larger crate graph builds.

Compatibility Notes
- [`std::layout::Layout` size must not overflow `isize::MAX` when
  rounded up to `align`] (
  This also changes the safety conditions on
- [`PollFn` now only implements `Unpin` if the closure is `Unpin`]
  This is a possible breaking change if users were relying on the
  blanket unpin implementation.  See discussion on the PR for
  details of why this change was made.
- [Drop ExactSizeIterator impl from std::char::EscapeAscii]
  This is a backwards-incompatible change to the standard library's
  surface area, but is unlikely to affect real world usage.
- [Do not consider a single repeated lifetime eligible for elision
  in the return type] (
  This behavior was unintentionally changed in 1.64.0, and this
  release reverts that change by making this an error again.
- [Reenable disabled early syntax gates as future-incompatibility
  lints] (
- [Update the minimum external LLVM to 13]
- [Don't duplicate file descriptors into stdio fds]
- [Sunset RLS](
- [Deny usage of `#![cfg_attr(..., crate_type = ...)]` to set the
  crate type] (
  This strengthens the forward compatibility lint
  deprecated_cfg_attr_crate_type_name to deny.
- [`llvm-has-rust-patches` allows setting the build system to treat
  the LLVM as having Rust-specific patches]
  This option may need to be set for distributions that are building
  Rust with a patched LLVM via `llvm-config`, not the built-in

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

- [Add `` and `x.ps1` shell scripts]
- [compiletest: use target cfg instead of hard-coded tables]
- [Use object instead of LLVM for reading bitcode from rlibs]
- [Enable MIR inlining for optimized compilations]
  This provides a 3-10% improvement in compiletimes for real world
  crates. See [perf results]

Revision 1.5 / (download) - annotate - [select for diffs], Tue Aug 30 19:22:17 2022 UTC (9 months, 1 week ago) by he
Branch: MAIN
CVS Tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3
Changes since 1.4: +11 -3 lines
Diff to previous 1.4 (colored)

lang/rust: update to version 1.62.1.

Pkgsrc changes:

 * Bump required GCC to 7 (same as LLVM) to avoid ABI issues
   Fixes native i386 and powerpc 8.x build w/pkgsrc LLVM 14
 * Bump available bootstraps to 1.61.0.
 * Also unlimit stacksize
 * Sync patches over from wip/rust
 * Adjust line number in patches which had non-zero offsets.
 * no longer pass -I/usr/pkg/include through via gcc-wrap script
   when building natively.  Attempt at fixing version skew with curl
   package vs. internal version of curl (may not work...)
 * The NetBSD bootstraps now use .xz compression.
 * Use mk/  Still have conditional for libatomic-links.
 * Default to using the internal LLVM when cross-building.

Upstream changes:

Version 1.62.1 (2022-07-19)

Rust 1.62.1 addresses a few recent regressions in the compiler and standard
library, and also mitigates a CPU vulnerability on Intel SGX.

* [The compiler fixed unsound function coercions involving `impl
  Trait` return types.][98608]
* [The compiler fixed an incremental compilation bug with `async
  fn` lifetimes.][98890]
* [Windows added a fallback for overlapped I/O in synchronous reads
  and writes.][98950]
* [The `x86_64-fortanix-unknown-sgx` target added a mitigation for the
  MMIO stale data vulnerability][98126], advisory [INTEL-SA-00615].


Version 1.62.0 (2022-06-30)


- [Stabilize `#[derive(Default)]` on enums with a `#[default]` variant][94457]
- [Stop validating some checks in dead code after functions with
  uninhabited return types][93313]
- [Fix constants not getting dropped if part of a diverging expression][94775]
- [Support unit struct/enum variant in destructuring assignment][95380]
- [Remove mutable_borrow_reservation_conflict lint and allow the
  code pattern][96268]


- [linker: Stop using whole-archive on dependencies of dylibs][96436]
- [Make `unaligned_references` lint deny-by-default][95372]
  This lint is also a future compatibility lint, and is expected to eventually
  become a hard error.
- [Only add codegen backend to dep info if -Zbinary-dep-depinfo is used][93969]
- [Reject `#[thread_local]` attribute on non-static items][95006]
- [Add tier 3 `aarch64-pc-windows-gnullvm` and `x86_64-pc-windows-gnullvm`
- [Implement a lint to warn about unused macro rules][96150]
- [Promote `x86_64-unknown-none` target to Tier 2\*][95705]

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


- [Move `CStr` to libcore, and `CString` to liballoc][94079]
- [Windows: Use a pipe relay for chaining pipes][95841]
- [Replace Linux Mutex and Condvar with futex based ones.][95035]
- [Replace RwLock by a futex based one on Linux][95801]
- [std: directly use pthread in UNIX parker implementation][96393]

Stabilized APIs

- [`bool::then_some`]
- [`f32::total_cmp`]
- [`f64::total_cmp`]
- [`Stdin::lines`]
- [`windows::CommandExt::raw_arg`]
- [`impl<T: Default> Default for AssertUnwindSafe<T>`]
- [`From<Rc<str>> for Rc<[u8]>`][rc-u8-from-str]
- [`From<Arc<str>> for Arc<[u8]>`][arc-u8-from-str]
- [`FusedIterator for EncodeWide`]
- [RDM intrinsics on aarch64][stdarch/1285]


- [Create clippy lint against unexpectedly late drop for temporaries
  in match scrutinee expressions][94206]


- Added the `cargo add` command for adding dependencies to `Cargo.toml` from
  the command-line.
- Package ID specs now support `name@version` syntax in addition to the
  previous `name:version` to align with the behavior in `cargo add` and other
  tools. `cargo install` and `cargo yank` also now support this syntax so the
  version does not need to passed as a separate flag.
- The `git` and `registry` directories in Cargo's home directory (usually
  `~/.cargo`) are now marked as cache directories so that they are not
  included in backups or content indexing (on Windows).
- Added automatic `@` argfile support, which will use "response files" if the
  command-line to `rustc` exceeds the operating system's limit.

Compatibility Notes

- `cargo test` now passes `--target` to `rustdoc` if the specified target is
  the same as the host target.
- [rustdoc: Remove .woff font files][96279]
- [Enforce Copy bounds for repeat elements while considering lifetimes][95819]

Internal Changes

- [Unify ReentrantMutex implementations across all platforms][96042]

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


[`impl<T: Default> Default for AssertUnwindSafe<T>`]:
[`FusedIterator for EncodeWide`]:

Version 1.61.0 (2022-05-19)


- [`const fn` signatures can now include generic trait bounds][93827]
- [`const fn` signatures can now use `impl Trait` in argument and return
- [Function pointers can now be created, cast, and passed around in a
  `const fn`][93827]
- [Recursive calls can now set the value of a function's opaque
  `impl Trait` return type][94081]


- [Linking modifier syntax in `#[link]` attributes and on the command
  line, as well as the `whole-archive` modifier specifically, are now
- [The `char` type is now described as UTF-32 in debuginfo][89887]
- The [`#[target_feature]`][target_feature] attribute
  [can now be used with aarch64 features][90621]
- X86 [`#[target_feature = "adx"]` is now stable][93745]


- [`ManuallyDrop<T>` is now documented to have the same layout as `T`][88375]
- [`#[ignore = "#"]` messages are printed when running tests][92714]
- [Consistently show absent stdio handles on Windows as NULL handles][93263]
- [Make `std::io::stdio::lock()` return `'static` handles.][93965]
  Previously, the creation of locked handles to stdin/stdout/stderr would
  borrow the handles being locked, which prevented writing
  `let out = std::io::stdout().lock();` because `out` would outlive
  the return value of `stdout()`.
  Such code now works, eliminating a common pitfall that affected many
  Rust users.
- [`Vec::from_raw_parts` is now less restrictive about its inputs][95016]
- [`std::thread::available_parallelism` now takes cgroup quotas into
  account.][92697] Since `available_parallelism` is often used to create a
  thread pool for parallel computation, which may be CPU-bound for
  performance, `available_parallelism` will return a value consistent with
  the ability to use that many threads continuously, if possible.
  For instance, in a container with 8 virtual CPUs but quotas only allowing
  for 50% usage, `available_parallelism` will return 4.

Stabilized APIs

- [`Pin::static_mut`]
- [`Pin::static_ref`]
- [`Vec::retain_mut`]
- [`VecDeque::retain_mut`]
- [`Write` for `Cursor<[u8; N]>`][cursor-write-array]
- [`std::os::unix::net::SocketAddr::from_pathname`]
- [`std::process::ExitCode`] and [`std::process::Termination`].
  The stabilization of these two API s now makes it possible for
  programs to return errors from `main` with custom exit codes.
- [`std::thread::JoinHandle::is_finished`]

These APIs are now usable in const contexts:

- [`<*const T>::offset` and `<*mut T>::offset`][ptr-offset]
- [`<*const T>::wrapping_offset` and `<*mut T>::wrapping_offset`]
- [`<*const T>::add` and `<*mut T>::add`][ptr-add]
- [`<*const T>::sub` and `<*mut T>::sub`][ptr-sub]
- [`<*const T>::wrapping_add` and `<*mut T>::wrapping_add`][ptr-wrapping_add]
- [`<*const T>::wrapping_sub` and `<*mut T>::wrapping_sub`][ptr-wrapping_sub]
- [`<[T]>::as_mut_ptr`][slice-as_mut_ptr]
- [`<[T]>::as_ptr_range`][slice-as_ptr_range]
- [`<[T]>::as_mut_ptr_range`][slice-as_mut_ptr_range]


No feature changes, but see compatibility notes.

Compatibility Notes

- Previously native static libraries were linked as `whole-archive` in
  some cases, but now rustc tries not to use `whole-archive` unless
  explicitly requested. This [change][93901] may result in linking errors
  in some cases. To fix such errors, native libraries linked from the
  command line, build scripts, or [`#[link]` attributes][link-attr] need to
  - (more common) either be reordered to respect dependencies between them
    (if `a` depends on `b` then `a` should go first and `b` second)
  - (less common) or be updated to use the [`+whole-archive`] modifier.
- [Catching a second unwind from FFI code while cleaning up from a Rust
  panic now causes the process to abort][92911]
- [Proc macros no longer see `ident` matchers wrapped in groups][92472]
- [The number of `#` in `r#` raw string literals is now required to be
  less than 256][95251]
- [When checking that a dyn type satisfies a trait bound, supertrait
  bounds are now enforced][92285]
- [`cargo vendor` now only accepts one value for each `--sync` flag]
- [`cfg` predicates in `all()` and `any()` are always evaluated to detect
  errors, instead of short-circuiting.][94295] The compatibility
  considerations here arise in nightly-only code that used the
  short-circuiting behavior of `all` to write something like
  `cfg(all(feature = "nightly", syntax-requiring-nightly))`, which
  will now fail to compile. Instead, use either `cfg_attr(feature
  = "nightly", ...)` or nested uses of `cfg`.
- [bootstrap: static-libstdcpp is now enabled by default, and can
  now be disabled when llvm-tools is enabled][94832]

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.

- [debuginfo: Refactor debuginfo generation for types][94261]
- [Remove the everybody loops pass][93913]


Revision 1.4 / (download) - annotate - [select for diffs], Fri Dec 21 23:12:34 2018 UTC (4 years, 5 months ago) by he
Branch: MAIN
CVS Tags: pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4
Changes since 1.3: +3 -0 lines
Diff to previous 1.3 (colored)

Upgrade rust to version 1.31.1.

Pkgsrc changes:
 * Sadly, I had to reinstate the "make tar files" rust code to make
   it possible to build cross-compiled bootstrap kits.
 * Add an adjustable "BUILD_TARGET", "dist" for cross-building
   a bootstrap kit, "build" for a normal native build.
 * New bootstrap kits built for NetBSD/powerpc, NetBSD/earmv7hf,
   and NetBSD/sparc64 version 1.31.1.
 * gcc-wrap script amended to also drop -Wl,--enable-new-dtags
   (so it could be used outside pkgsrc)
 * Worked around use of AtomicU64 in release build tool (ugly band-aid patch).
   Some platforms lack support for that type and associated operations.

Upstream changes:
 - [Fix Rust failing to build on `powerpc-unknown-netbsd`][56562]
 - [Fix broken go-to-definition in RLS][rls/1171]
 - [Fix infinite loop on hover in RLS][rls/1170]


Revision 1.3 / (download) - annotate - [select for diffs], Sun Oct 28 13:21:36 2018 UTC (4 years, 7 months ago) by he
Branch: MAIN
Changes since 1.2: +17 -0 lines
Diff to previous 1.2 (colored)

Upgrade rust to version 1.29.2.

Upstream changes:
 * Workaround for an aliasing-related LLVM bug, which caused miscompilation.
 * The rls-preview component on the windows-gnu targets has been restored.

Pkgsrc changes:
 * More commented-out settings for cross builds on NetBSD.
 * Bump bootstrap kit versions to 1.29.2 for powerpc, sparc64
   and earm7hf.  Anyone up for testing for earm7hf?
 * Because the built-in versions of libgit2, libssh2 and curl
   can no longer be built with the pkgsrc-provided headers for
   those packages (due to version skew; the built-in versions
   have been updated to un-released newer code), the
   files for those packages have been commented out.
 * Similarly, to avoid using the native pkgsrc host's headers when cross-
   building, the gcc-wrap script has been adjusted to also re-point
   /usr/pkg/include into the destination's root (where those above pacakges
   are not to be installed).
 * Also have the gcc-wrap script deal with "-I dir" style directives,
   and re-point these also into the destination's root.
 * One patch has been integrated upstream, so removed here.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Oct 15 11:22:23 2018 UTC (4 years, 7 months ago) by he
Branch: MAIN
Changes since 1.1: +76 -29 lines
Diff to previous 1.1 (colored)

Add pointers to (so far untested) bootstrap kits for sparc64 and earmv7hf.

Prepare wrapper script handling for use of clang (not yet fully verified).

Adjust the cross-compiler wrapper script to improve the handling
when used as the linker:
 * Insert "linker tweaks" before first -L or -l
 * Handle "-L arg" style as well as "-Larg"
 * Add "-Wl,-rpath-link" to the linker tweaks just to be sure...


Revision 1.1 / (download) - annotate - [select for diffs], Sat Oct 13 10:03:37 2018 UTC (4 years, 7 months ago) by he
Branch: MAIN

Add the bits required to build rust on NetBSD/powerpc ports, and
point to the bootstrap kit for NetBSD/powerpc I'm hosting at the

Also add the bits I used when cross-building the NetBSD/powerpc
rust on amd64, commented out, as well as the gcc / c++ wrapper
script I used in the process.

The changes affecting other ports are:
 * We now add LD_LIBRARY_PATH in the make environment, so that
   if the bootstrap kit binaries and shared libraries don't have
   the $ORIGIN-style RPATH entries, it will still work
 * The script has been changed to turn off the
   generation of debuginfo in "RUSTFLAGS"; for some so far unknown
   reason, the NetBSD/powerpc rust will not build if you ask for
   debug info.  This could perhaps have been made OS-variant dependent,
   but isn't at the moment.


This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

CVSweb <>