summaryrefslogtreecommitdiff
path: root/dev-lang/rust/files/1.74.1-cross-compile-libz.patch
AgeCommit message (Collapse)Author
2025-06-04dev-lang/rust: stop using FILESDIRMatt Jolly
files/ has been too big for a while now. Instead use the rust-patches repository that was created to manage these patches. No revbumps required - they were either done beforehand when we dropped a bad patch _or_ are not required as the only additions are backported build-time fixes (done in previous commits). Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-06-04dev-lang/rust: add GCC 15 patches to older RustsMatt Jolly
Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-02-10dev-lang/rust: crossdev supportMatoro Mahri
This allows Rust to be cross-compiled with crossdev. This is the last item for bug 680652, closing it. Note that this is for a foreign CHOST, i.e., CBUILD != CHOST == CTARGET. It does not cover the scenario for CBUILD == CHOST != CTARGET(s), which is tracked separately in bug 679878. A number of changes were required in order to make this work: * Force USE=system-bootstrap, since we cannot specify the appropriate boostrap URL based on CBUILD in SRC_URI * LLVm is compiled twice as part of the build, once for host and once for target. However, the rust build uses the same settings from config.toml for both builds. Therefore we cannot override flags nor default-linker and must let rust choose them for us. * Set the appropriate build/host variables which correspond to CBUILD/CHOST. This works as expected. * Set PKG_CONFIG and OPENSSL_*_DIR variables; cargo needs these for some reason. * Enforce that LLVM_TARGETS is set correctly for both host and target arches. This uses the new llvm_tuple_to_target function, introduced in https://github.com/gentoo/gentoo/pull/33996 * Lastly a small patch to rust source is needed, to tell it to link with system libz. It's unclear why this scenario was excluded under cross-compile conditions in upstream rust. See: https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22 Bug: https://bugs.gentoo.org/679878 Closes: https://bugs.gentoo.org/680652 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/35246 Signed-off-by: Sam James <sam@gentoo.org>