lang/rust: fix runtime on powerpc64le
Backport an LLVM fix for the loop vectorizer emitting invalid IR
for extractvalue of a widened sadd.with.overflow. On powerpc64le this
broke everything using libbz2-rs-sys (py-maturin, proton-pass-cli) with
"Cannot select: i64 = sign_extend v4i32".
Mk/Uses/cargo.mk, lang/rust: keep RUST_BACKTRACE on powerpc64le
Only backtraces captured by libraries hit the libunwind bug, so disable
those with RUST_LIB_BACKTRACE and keep panic backtraces everywhere. The
fix is in releng/14.5, stable/15 and main.
lang/rust-nightly: update 1.99.0.20260809 → 1.100.0.20260909
- Sync patches to lang/rust
- Force disable profiler on wasm target, it does not build and
is not supposed to according to upstream ([1])
[1] https://github.com/rust-lang/rust/issues/162551
Approved by: rust (implicit)
lang/rust: set RUST_BACKTRACE=1 on recent CURRENT on powerpc64le
After src 70509d1d9cba254dfd5b3dd83d8a011b5e125788, RUST_BACKTRACE=1
doesn't cause a crash anymore.
lang/rust{,-bootstrap}, Mk/Uses/cargo.mk: Relax COMPAT_FREEBSD11 check
lang/rust{,-bootstrap} themselves do not need COMPAT_FREEBSD11 any more,
nor do crates that don't depend on pre-0.2.176 libc. For those that
still do, emit a warning for porters to see so that we can eventually
fully move away from needing COMPAT_FREEBSD11.
Note lang/rust188, and the bootstrap 1.87 it depends on, both predate
1.93, the first version of rust itself to use libc >= 0.2.176, so the
check remains in lang/rust188.
Note also Mk/bsd.gecko.mk does its own thing due to the vendored crates,
and will need its own approach to this issue.
PR: 281600
Reviewed by: mikael (rust)
Approved by: mikael (rust)
MFH: 2026Q3
lang/rust: fix runtime on powerpc64le/CURRENT
powerpc64le switched to 128-bit long double, which is implemented in
compiler_rt (libgcc). Link to libgcc to resolve those symbols correctly.
Noop for older releases.
lang/rust-nightly: update 1.97.0.20260511 → 1.98.0.20260526
- Enable miri
- Include a patch from upstream PR to avoid network access during build
Approved by: rust (implicit)
*: Fix spelling and typos in comments and pkg-descr's of various ports
Pull Request: https://github.com/freebsd/freebsd-ports/pull/506
Co-authored-by: Gleb Popov <arrowd@FreeBSD.org>
lang/rust: fix build on armv7
We have previously (cf. PR 282663) disabled the has_thread_local feature
on armv7 to work around an rtld bug. The bug was fixed with D42415, but
the workaround remained. Earlier this year, rust started to fail to
build due to the workaround, as the fallback TLS implementation is
limited to the number of pthread TLS keys (256) and rust has started to
consume more and more of them. While a temporary workaround reducing
the hunger for TLS keys was implemented in 2026Q2, we can actually just
reenable has_thread_local to go back to how things are supposed to work.
PR: 294545
Approved by: mikael (rust)
MFH: no
Revert "lang/rust: fix build with LLVM 22 (PORT_LLVM option)"
This reverts commit 91d047221724449855d84465d8ca53bdddb9fcc2.
This patch was not approved.
This patch interferes with pending rust update (pr 293615)
There was no rush to push this patch since there is a pending rust update (pr 293615)
It breaks lang/rust-nightly
lang/rust: fix build with LLVM 22 (PORT_LLVM option)
PassPlugin moved to a new location starting LLVM 22.
Reference: https://github.com/rust-lang/rust/pull/150394
lang/rust: Update to 1.93.0
While here, drop AR as it's deprecated since 2015 [1]
Announce: https://blog.rust-lang.org/2026/01/22/Rust-1.93.0/
ChangeLog: https://github.com/rust-lang/rust/releases/tag/1.93.0
PR: 292713
Tested by: mikael, pkubaj
Differential Revision: https://reviews.freebsd.org/D54619 [1]
lang/rust: really fix WASM with PORT_LLVM
Bundled LLVM is never built when llvm-config is specified in
config.toml, ie PORT_LLVM, and base system LLVM doesn't support
wasm32-unknown-unknown triple. Restore the previous behaviour of
using clang from the LLVM port when PORT_LLVM is enabled. Also
really fix the ${LLVM_VERSION} logic, as the variable is from
USES=llvm.
lang/rust: privatise ${_LLVM_VERSION}
Did not initially notice the added ${LLVM_VERSION} to denote minimum
required PORT_LLVM version, but privatise to avoid collision with
USES=llvm's ${LLVM_VERSION} logic.
lang/rust: Update to 1.91.1
- Drop WASM option as it requires llvm from ports
it was probably broken since it was introduced and no one noticed / used it
Announce: https://blog.rust-lang.org/2025/10/30/Rust-1.91.0/
https://blog.rust-lang.org/2025/11/10/Rust-1.91.1/
ChangeLog: https://github.com/rust-lang/rust/releases/tag/1.91.0
https://github.com/rust-lang/rust/releases/tag/1.91.1
PR: 290816
Tested by: mikael,pkubaj
lang/rust: bump PORT_LLVM minimum version to 18
Source:
https://github.com/rust-lang/rust/pull/139275/commits/12167d7064597993355e41d3a8c20654bccaf0be
Reported by: Mark Millard <marklmi@yahoo.com>
lang/rust: Update to 1.86.0
Announce: https://blog.rust-lang.org/2025/04/03/Rust-1.86.0.html
ChangeLog: https://github.com/rust-lang/rust/releases/tag/1.86.0
Put back rustdoc in _RUST_TOOLS, rustdoc is an integral part of cargo
and has no connection with DOCS.
PR: 285381,285840
Tested by: mikael,pkubaj
lang/rust: Update to 1.85.1
While here:
- remove rustdoc from _RUST_TOOLS, it has to be added only when
DOCS option is enabled
- add DOCS to OPTIONS_DEFAULT [1]
- building docs on armv7 is fixed
PR: 285381 [1]
lang/rust: do not build the documentation on armv7
A bug [1] prevents documentation from being compiled on this
platform, disable it until it's fixed in a release branch.
[1] https://github.com/rust-lang/rust/pull/137632
Reported by: mmel
lang/rust: Make OpenSSL use the system default truststore in Cargo
Cargo uses curl-rust and git2-rs (which uses curl-rest as well).
Unfortunately, git2-rs calls openssl_probe::init_ssl_cert_env_vars()
unconditionally which breaks the process environment by setting an invalid
value for SSL_CERT_DIR and then the system default truststore is circumvented,
resulting in certificate validation errors even if certctl(8) manages
everything nicely.
Upstream issues:
* https://github.com/alexcrichton/openssl-probe/issues/37
* https://github.com/rust-lang/git2-rs/pull/1130
Reviewed by: jrm (mentor), mikael (rust)
MFH: 2025Q1
Differential Revision: https://reviews.freebsd.org/D49120