summaryrefslogtreecommitdiff
path: root/dev-lang/rust/rust-1.81.0-r100.ebuild
AgeCommit message (Collapse)Author
2025-02-10dev-lang/rust: Set RPATH instead of using ld.so.conf for libsMatt Jolly
For a reason lost to the sands of time, Gentoo was previously disabling the `rpath` option in the Rust config.toml and instead adding Rust the Rust lib path to `ld.so.conf` via entries installed in `/etc/env.d`. This was fine before we enabled slotting on the Rust package, however with increasing numbers of Rust slots a hash collision was inevitable and eventually happened between 1.84.0 and 1.84.1, resulting in `undefined symbol` errors when invoking `rustc` or `cargo`. Since we install Rust in a very similar way to upstream, it makes sense to set the `RUNPATH` to `$ORIGIN/../lib` as their packaging does and not pollute ld.so.conf with Rust paths. This enables dev-lang/rust binaries to search relative to their install location, and will therefore always respect EPREFIX. Also drop obsolete 1.82.0-r100; no need to revbump that. Closes: https://bugs.gentoo.org/949374 Signed-off-by: Matt Jolly <kangie@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
2025-01-18dev-lang/rust: set experimental-targets according to USEZ. Liu
set experimental-targets to the intersection of USE and all experimental targets, otherwise it will fails to build with messages like: The target `......' is experimental and must be passed via LLVM_EXPERIMENTAL_TARGETS_TO_BUILD. Closes: https://bugs.gentoo.org/921683 Closes: https://bugs.gentoo.org/923066 Closes: https://bugs.gentoo.org/930921 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/38378 Signed-off-by: Sam James <sam@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/llvmMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/lldMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-11Move {dev-debug → llvm-core}/lldbMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/clangMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-11Move sys-libs/llvm-libunwind → llvm-runtimes/libunwindMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-02dev-lang/rust: update non-slotted rust library tidyupMatt Jolly
We would previously `die` if there was only one file found matching libraries in ${old_rust_libs} after the fingerprint was stripped. It turns out that it's not uncommon for fingerprints to match, and it is entirely possible for one (or most!) libraries to actually be overridden. Keep the existing duplicate handling but log the `expected 2 but found 1` case just in case we need to track this down. Since all -r100 ebuild are having `pkg_postinst` updated, be consistent about `optfeature` usage. Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-11-25dev-lang/rust: -r100: add postinst workaround for --keep-goingMatt Jolly
A bug in Portage's --keep-going option can cause it to fail to uninstall non-slotted Rust files when resuming an interrupted upgrade. This results in a broken Rust installation, preventing compilation and requiring manual intervention. We can work around this by deleting duplicate Rust libraries in postinst. Bug: https://bugs.gentoo.org/943308 Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-11-22dev-lang/rust: Set PKG_CONFIG and OPENSSL variables with ESYSROOT and not ROOTJames Le Cuirot
This requires moving this code from pkg_setup to src_configure because ESYSROOT is not valid in the former. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
2024-11-18dev-lang/rust: libexec-${PV} symlink requires USE=rust-analyzerMatt Jolly
Until 1.72.0 `cargo-credential-1password` was installed in `/usr/lib/rust/${PV}/libexec`, and we were able to unconditionally symlink that for eselect-rust to use. This is no longer the case and most of the time users end up with a broken symlink for each rust slot in /usr/lib/rust. Gate the symlink creation with the appropriate USE and conditionally add `/usr/lib/rust/libexec` to the eselect-rust provider config. Closes: https://bugs.gentoo.org/915403 Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-11-12dev-lang/rust{,-bin}: update GDB/LLDB postinst messageMatt Jolly
dev-lang/rust was never properly updated and refers to scripts as a singular script. dev-lang/rust-bin was inconsistent with dev-lang/rust; never mentioning LLDB (or doing checks for either). Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-11-12dev-lang/rust: drop USE=system-bootstrapMatt Jolly
To be consistent with other ecosystems (e.g. Ada, Go), we can take advantage of the new Rust eclass (and some earlier prep work on USE=system-bootstrap) to completely remove that build path. This isn't a big change; dev-lang/rust without system-bootstrap would previously download its own bootstrap binary (same as rust-bin) instead of depending on dev-lang/rust-bin as appropriate. dev-lang/rust will now always receive an `||` dependency which ensures that an appropriate dev-lang/rust{,-bin} is available on the system to do any required bootstrapping. This will reduce Rust maintenance overhead, and make it more transparent to users that a Rust binary is required to bootstrap rust. Closes: https://bugs.gentoo.org/943144 Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-11-12dev-lang/rust: use rust.eclass for USE=system-bootstrapMatt Jolly
Take advantage of rust.eclass for dependency generation and appropriate bootstrap slot selection. Between the PATH manipulation that the eclass performs and the exported `RUSTC` we should see significantly more consistent bootstraps. Without this change `eselect-rust` would determine which `rustc` to run, resulting in build failures if an incorrect Rust was selected (which is nearly always in the age of slotted Rust). This is also one step towards removing USE=system-bootstrap entirely; now that we can reliably (and trivially) select appropriate slots for both dev-lang/rust and dev-lang/rust-bin we'll shortly be able to avoid downloading bootstrap bins at all. Bug: https://bugs.gentoo.org/943144 Closes: https://bugs.gentoo.org/943145 Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-11-09dev-lang/rust: update DEPENDMatt Jolly
`LLVM_DEPEND` is actually an array so we need to expand it else we only get the first element. Closes: https://bugs.gentoo.org/943131 Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-11-09dev-lang/rust: *-r100 fix build with USE=system-llvmMatt Jolly
This path still used legacy llvm eclass get_llvm_prefix calls that included a slot. This is not supported by llvm-r1. Signed-off-by: Matt Jolly <kangie@gentoo.org>
2024-11-09dev-lang/rust: tweak blockersSam James
* Use just :0 to simplify and shorten the blockers. By doing this, we also cover upgrading from older versions than those listed too. * Include dev-lang/rust-bin too. Signed-off-by: Sam James <sam@gentoo.org>
2024-11-09dev-lang/rust{,-bin}: port to llvm-r1 and slot (-r100)Matt Jolly
Port to llvm-r1 to gain the fancy new `llvm_slot_{x}` USE flags which we use in the rust eclass to force a closer dependency on specific LLVM slots. Since Rust in Gentoo is only ever built against the one LLVM slot we are able to simplify the LLVM logic in the Rust ebuilds and use our knowledge of the LLVM -> Rust version mapping to enable slots for dev-lang/rust in a usable manner. Since Rust is now slotted and not managed entirely by eselect-rust each slot needs to be added to LDPATH. We also drop the `profiler` USE as it's inconsistent with what upstream ship by default and casues issues where other package's build systems assume that it exists. This commit also introduces dev-lang/rust-common which handles bash completions for slotted Rust. dev-lang/rust-bin: `LLVM_OPTIONAL` is used as we don't need to consume LLVM, we really just want the free IUSE. Closes: https://bugs.gentoo.org/941146 Signed-off-by: Matt Jolly <kangie@gentoo.org>