<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/xback/tools, branch master</title>
<subtitle>Staging tree of Koen Vandeputte</subtitle>
<id>https://git-03.infra.openwrt.org/openwrt/staging/xback/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/'/>
<updated>2026-11-04T10:32:56Z</updated>
<entry>
<title>tools/ninja: support the pipe-based jobserver of GNU Make</title>
<updated>2026-11-04T10:32:56Z</updated>
<author>
<name>Koen Vandeputte</name>
</author>
<published>2026-11-04T10:32:56Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=2bd0f947e95dcf420ea5eb9c05af7313bed69706'/>
<id>urn:sha1:2bd0f947e95dcf420ea5eb9c05af7313bed69706</id>
<content type='text'>
Since the update to 1.13.1, ninja uses its own jobserver client instead
of the patch OpenWrt carried. That client only implements the fifo form
of GNU Make 4.4 and later. GNU Make 4.3, the version of Ubuntu 22.04 and
24.04 and of Debian 12, passes its jobserver as a pair of pipe
descriptors, which ninja ignores with "Pipe-based protocol is not
supported!". Every ninja build then runs as many jobs as there are CPUs
plus two, whatever -j the build was started with: tools/cmake and all
CMake and Meson packages.

Building several trees at -j6 on a 32 thread host ran 34 compilers per
tree in tools/cmake, filling 30 GB of RAM and 39 GB of swap.

Support the pipe form on Linux: open new non-blocking file descriptions
of the inherited pipe through /proc/self/fd, so that make's own
descriptors stay blocking. With make -j4, tools/cmake now runs at most
4 compilers at once, and two ninjas under one make share its 4 slots.

Assisted-by: Claude Opus 5.5
Signed-off-by: Koen Vandeputte &lt;koen.vandeputte@citymesh.com&gt;
</content>
</entry>
<entry>
<title>tools/sccache: add sccache Rust compiler cache</title>
<updated>2026-10-30T10:06:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-22T22:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=a1788e6156cf4541aaae31191b693d2008c79541'/>
<id>urn:sha1:a1788e6156cf4541aaae31191b693d2008c79541</id>
<content type='text'>
RUST_SCCACHE builds sccache 0.18.0 from a vendor tarball and makes it
the RUSTC_WRAPPER of the cargo builds of host tools, target packages
and libstd-rust. For target packages, scripts/rust-target-wrapper.sh
runs it in turn. The option sits next to CCACHE and is available with
any Rust toolchain of the build system. The packages feed defines
RUST_SCCACHE as well, without a dependency, and Kconfig merges both
definitions, so the tools and the cargo variables check for a Rust
toolchain once more.

sccache is built without default features: the local disk cache stays,
the remote storage backends and their HTTP and TLS stacks are left out,
so the build needs no host library. sccache needs rustc to build, so
the rustc build from source and the sccache build run unwrapped.

sccache keeps its cache and configuration in $(TOPDIR)/.sccache, or in
RUST_SCCACHE_DIR when set, and its server listens on a socket in
$(TMP_DIR), so that each tree has a server of its own. distclean
removes .sccache, and the SCCACHE_* variables of the environment are
unexported.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;

</content>
</entry>
<entry>
<title>tools/meson: add rust entry to meson cross file</title>
<updated>2026-10-30T10:06:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-08T10:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=0508180cc788356f5cdf563bfbab9318960c2a81'/>
<id>urn:sha1:0508180cc788356f5cdf563bfbab9318960c2a81</id>
<content type='text'>
Add target and native Rust compiler entries when a package includes
rust-values.mk. Its include guard tells, as the packages feed has a
rust-values.mk of its own, which python3-host.mk includes for every
Python package. The target entry carries the triple, CPU flags,
target-owned sysroot and standard-library linkage choice; native probes
use the host sysroot.

Supply bindgen with the toolchain sysroot and selected LLVM paths.
Register the target libstd build dependency and configuration inputs
for Rust consumers.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;

</content>
</entry>
<entry>
<title>build: add Rust package build helpers</title>
<updated>2026-10-30T10:06:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-08T10:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=32f1c26eb631b16b4184ba54d267a3984c8072d0'/>
<id>urn:sha1:32f1c26eb631b16b4184ba54d267a3984c8072d0</id>
<content type='text'>
Add rust-package.mk for target packages written in Rust. The Cargo
environment carries the target triple, CPU flags, the C and C++ flags
for cc-rs, the linker and the ABI-specific sysroot of libstd-rust,
while native build scripts and proc macros keep the host sysroot and
linker. Builds run in the crate's working directory with an explicit
target and offline from the vendor tarball; with a source tree override
(git-src, USE_SOURCE_DIR), which has none, Cargo fetches the locked
crates. Target packages depend on libstd-rust at build time and track
its configuration inputs for rebuilds.

rustc runs the linker with arguments of its own, without TARGET_LDFLAGS.
The linker selection and the -z options that hardening.mk and
package.mk set for every package are passed to rustc, for packages and
for libstd-rust.

When the target triple is the build host's, cc-rs takes the host
compiler for target C code as well. For that triple the C and C++
compiler of cc-rs is scripts/rust-cc-wrapper.sh, linked into
$(STAGING_DIR_HOST)/bin by tools/rust. It runs the target compiler with
the target flags for build scripts whose OUT_DIR lies in the target
triple's directory, and the host compiler for the others.

RUST_PREFER_DYNAMIC is available with any Rust toolchain, controls the
default userspace standard-library linkage and defaults to shared
linking. Packages can override it. Release builds use LTO either way;
rustc runs LTO next to -Cprefer-dynamic only with the unstable
-Zdylib-lto. RUST_PKG_DEPENDS carries the architecture dependencies
and, with shared linking, the libstd-rust runtime dependency. For
packages that keep the default, that dependency is conditional on
RUST_PREFER_DYNAMIC, as .config is not read while package metadata is
collected.

Release builds emit no unwind tables and take the size options of
unstable rustc that libstd-rust is built with: panics without location,
derived Debug output reduced to type names and, with
RUST_PANIC_IMMEDIATE_ABORT, -Cpanic=immediate-abort. Permitting unstable
options for every crate with RUSTC_BOOTSTRAP=1 changes the code of
dependencies: the build scripts of anyhow, thiserror and proc-macro2
then detect unstable features and use them.
scripts/rust-target-wrapper.sh, the RUSTC_WRAPPER of package builds,
adds the options, and -Zdylib-lto with a shared libstd, only to the
target crates cargo compiles, recognised by --target, -C metadata and
--error-format=json, and permits unstable options for that crate alone.
Build scripts and their probes see neither. A package keeps panic
locations with RUST_PKG_LOCATION_DETAIL:=1 and selects the Debug output
with RUST_PKG_FMT_DEBUG. None of this applies with CONFIG_DEBUG.
Packages build the release profile, as maturin, CMake and autotools
projects do, and CONFIG_DEBUG gives it the settings of the dev profile,
ahead of the profile settings of the package. Build paths are mapped out
of packages as out of libstd-rust.

Without a Rust toolchain of the build system, Rust packages build with
rust/host of the packages feed, which installs to $(STAGING_DIR)/host,
so that packages can move from the Rust support of the packages feed
one at a time. RUSTC and CARGO point there, there is neither a sysroot
of libstd-rust nor a shared libstd, the mips64 triples are those its
std is built for, and on the build host's triple the target linker is
set through the Cargo variable. The build dependencies, on libstd-rust
or rust/host, follow USE_RUST_TOOLCHAIN in the package metadata, also
for host builds through rust-host-build.mk. After a switch from None to
a Rust toolchain, the cargo of rust/host still comes first in PATH, so
the help of the toolchain choice names its clean-up.

The file is derived from lang/rust in the packages feed by Luca Barbato
and Donald Hoskins.

Reported-by: Andre Heider &lt;a.heider@gmail.com&gt;
Co-developed-by: Brian Redbeard &lt;redbeard@dead-city.org&gt;
Signed-off-by: Brian Redbeard &lt;redbeard@dead-city.org&gt;
Co-developed-by: Aditya Nugraha &lt;vortexilation@gmail.com&gt;
Signed-off-by: Aditya Nugraha &lt;vortexilation@gmail.com&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>libstd-rust: build and package the Rust standard library</title>
<updated>2026-10-30T10:06:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-08T10:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=db310ff0fb5db94135f43be4f50536f0d033b476'/>
<id>urn:sha1:db310ff0fb5db94135f43be4f50536f0d033b476</id>
<content type='text'>
Build the sysroot crate with the selected Cargo and rustc, using the
source tarball's vendored crates and shared target CPU flags. Stage the
rlibs and shared library through normal package-owned target staging,
and include that sysroot in the SDK.
Separate Cargo output by ABI identity to keep dependency artefacts from
different configurations in their own build directories.

Name the shared library and package ABI from compiler, source, target
and build configuration inputs, with configuration changes triggering
a rebuild. Declare libgcc as a runtime dependency for libgcc_s.so.1.

Release builds optimise for size, abort on panic and emit no unwind
tables. They also take the size options of unstable rustc, which the
sysroot build permits anyway: panics carry no location
(-Zlocation-detail=none) and derived Debug output is reduced to type
names (-Zfmt-debug=shallow). RUST_PANIC_IMMEDIATE_ABORT, on by default,
builds with -Cpanic=immediate-abort and without the panic-unwind
feature: a panic stops the program at once, without formatting a
message. rustc requires the same panic strategy for all crates of a
program, the standard library included, so this is a build-wide option.
Debug builds retain unwinding, panic messages and full Debug output.

Build paths are mapped out of the library as iremap in rules.mk does
for C, unless CONFIG_DEBUG is set without
CONFIG_REPRODUCIBLE_DEBUG_INFO. The map stays out of the inputs of the
ABI identity, which would otherwise depend on the build path.

rust-values.mk maps the OpenWrt target to its Rust target triple and CPU
flags; the mapping is derived from lang/rust in the packages feed by
Luca Barbato and Donald Hoskins. The mips64 ABI comes from
CONFIG_MIPS64_ABI, which every mips64 configuration sets, and n64 maps
to the muslabi64 and gnuabi64 triples. These are hard-float, so
soft-float mips64 with musl uses mips64-openwrt-linux-musl, the
soft-float n64 target of rustc, and the other soft-float mips64 and
mips64el configurations, which have no Rust target, get no Rust
packages. The e500v2 of mpc85xx has no FPU but shares the hard-float
powerpc triple, whose hard-float feature is turned off with
CONFIG_SOFT_FLOAT. When the target triple is the build host's, as for
x86_64 and aarch64 glibc targets, Cargo links build scripts with the
target linker as well but keeps target rustflags off them, so the target
linker is passed as a rustflag in that case.

include/scan.mk rescans the package metadata when an include/rust-*.mk
file changes, as for include/package*.mk.

Co-developed-by: Brian Redbeard &lt;redbeard@dead-city.org&gt;
Signed-off-by: Brian Redbeard &lt;redbeard@dead-city.org&gt;
Co-developed-by: Aditya Nugraha &lt;vortexilation@gmail.com&gt;
Signed-off-by: Aditya Nugraha &lt;vortexilation@gmail.com&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>tools/corrosion: add corrosion-rs CMake-Cargo integration</title>
<updated>2026-10-30T10:06:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-08T10:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=05574936572fa17d104b0fa8d8378296a93dfe9e'/>
<id>urn:sha1:05574936572fa17d104b0fa8d8378296a93dfe9e</id>
<content type='text'>
Build corrosion-rs 0.5.1 from its GitHub release archive and install
its CMake modules into $(STAGING_DIR_HOST)/lib/cmake/Corrosion. CMake
projects use them through find_package(Corrosion) and
corrosion_import_crate(). USE_CORROSION is enabled by default with any
Rust toolchain.

With CMake 3.19 or later corrosion builds its generator only for
CORROSION_NATIVE_TOOLING, so the release archive is the whole source.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>tools/cbindgen: add cbindgen host tool</title>
<updated>2026-10-30T10:06:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-08T10:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=0ced767f14bb7291bdd9f466ffb5969eab33cae2'/>
<id>urn:sha1:0ced767f14bb7291bdd9f466ffb5969eab33cae2</id>
<content type='text'>
Build cbindgen 0.28.0 from a vendor tarball. cbindgen generates C
headers from Rust code and is needed by Mesa for the NIL and NAK
components of the Nouveau driver. USE_CBINDGEN is enabled by default
with any Rust toolchain.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>tools/bindgen: add bindgen-cli host tool</title>
<updated>2026-10-30T10:06:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-08T10:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=84e70f447eb0b8e70aaf1434b67a54c65a3f46a5'/>
<id>urn:sha1:84e70f447eb0b8e70aaf1434b67a54c65a3f46a5</id>
<content type='text'>
Build bindgen-cli 0.73.2 from a vendor tarball. bindgen loads libclang
from the BPF LLVM toolchain: the prebuilt one unpacked into the source
tree, the one built by tools/llvm-bpf or the host LLVM. Versions before
0.72.1 generate opaque structures together with libclang 22 or newer,
which tools/llvm-bpf provides.

BUILD_BINDGEN is enabled by default with any Rust toolchain and selects
the built LLVM when neither the host nor the prebuilt LLVM is in use.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>tools/rust: add Rust host compiler</title>
<updated>2026-10-30T10:06:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-08T10:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=429ccec2644e602b68fe5ebf83d9821c6aed191c'/>
<id>urn:sha1:429ccec2644e602b68fe5ebf83d9821c6aed191c</id>
<content type='text'>
Provide rustc, cargo, the host rust-std, rust-src and llvm-tools in
$(STAGING_DIR_HOST) in one of three ways. RUST_TOOLCHAIN_BUILD builds
them from the rustc source tarball with x.py. RUST_TOOLCHAIN_PREBUILT
installs the pinned components from static.rust-lang.org. For
RUST_TOOLCHAIN_HOST the components come from a relocatable toolchain on
the build host, which has to match the Rust version and is checked after
installation. The pinned components cover Linux hosts with glibc or
musl and macOS hosts, on x86_64 and aarch64; other hosts get an error
that names the host.

The choice sits in a "Rust toolchain options" menu of the developer
options, next to the external toolchain options and independent of
them. EXPERIMENTAL defaults to the prebuilt toolchain. As a Kconfig
choice resolves to none while its menu is hidden, USE_RUST_PREBUILT
carries that default in this case.

The xz2 crate of bootstrap is linked statically so that the compiler
needs no host liblzma at run time.

host-build.mk empties MAKEFLAGS for the build; x.py gets the jobserver
of make in MAKEFLAGS, so that bootstrap leaves the job count of ninja
and cargo to it, and one job when make runs without a jobserver.

The LLVM of a Rust release sinks the leading fence of a weak cmpxchg
into the reservation. On the e500v2 of mpc85xx the sync there clears
the reservation, so compare_exchange_weak loops never end. tools/rust
carries the LLVM change of rust/host in the packages feed, and on
mpc85xx the source build is the only choice and the default.

All three ways install into a prefix in one build directory, whose
prepared stamp depends on the choice, and the prefix is copied to
$(STAGING_DIR_HOST). As all three enable the same tool, the stamp of
the tools stage depends on the choice too. The installed files are
recorded in $(STAGING_DIR_HOST)/stamp and removed on clean and before
the next installation. The rust-installer metadata is removed from the
prefix: its manifests name absolute paths, which its uninstall.sh and
a later install.sh into the same prefix delete, those of the build
host's toolchain included.

Cargo reads .cargo/config.toml in every parent directory of its working
directory, and cargo and rustc take settings from the environment. The
build stops when such a file exists in TOPDIR or a parent directory,
and the CARGO, CARGO_* and RUST* variables of the environment are
unexported.

rust-values.mk holds the Rust version, the host triple, the hashes of
the pinned components and the Cargo home. The Cargo home is
$(STAGING_DIR_HOSTPKG)/cargo, shared by all targets, so that $(DL_DIR)
holds downloads only.

The xz2 and LLVM patches, the Rust build recipe and rust-values.mk are
derived from lang/rust in the packages feed by Luca Barbato and Donald
Hoskins.

Suggested-by: Andre Heider &lt;a.heider@gmail.com&gt;
Co-developed-by: Brian Redbeard &lt;redbeard@dead-city.org&gt;
Signed-off-by: Brian Redbeard &lt;redbeard@dead-city.org&gt;
Co-developed-by: Aditya Nugraha &lt;vortexilation@gmail.com&gt;
Signed-off-by: Aditya Nugraha &lt;vortexilation@gmail.com&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>mold: bump to 2.42.1</title>
<updated>2026-10-26T08:33:59Z</updated>
<author>
<name>Carsten Schuette</name>
</author>
<published>2026-10-25T18:28:28Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/xback/commit/?id=85398d134e0cce59efbd3c6f384a2da3df8dbfce'/>
<id>urn:sha1:85398d134e0cce59efbd3c6f384a2da3df8dbfce</id>
<content type='text'>
Update mold to 2.42.1

Changelog:
https://github.com/rui314/mold/releases/tag/v2.42.1

This is the last version of mold based on C++, newer versions are based
on Rust which needs different build systems.

Signed-off-by: Carsten Schuette &lt;schuettecarsten@googlemail.com&gt;
Link: https://github.com/openwrt/openwrt/pull/26188
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
</feed>
