summaryrefslogtreecommitdiff
path: root/dev-lang/rust
AgeCommit message (Collapse)Author
3 daysdev-lang/rust: SPIRV is an official target since 1.87Z. Liu
Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44884 Closes: https://github.com/gentoo/gentoo/pull/44884 Signed-off-by: Sam James <sam@gentoo.org>
2025-11-15dev-lang/rust: don't generate extra lockfilesAlfred Wingate
This causes problems with stale crate induced breakage that upstream rust doesn't appear to be affected by. Notably this downgraded crates to older versions than what were available at src_prepare time. Removing this got me around this issue and I didn't encounter workspaces needing this. In this instance, we hit an issue w/ icu_properties being pinned when upstream CI doesn't seem to be hitting that: ``` Locking 510 packages to latest compatible versions ... Adding icu_properties v2.0.1 (available: v2.1.1) ``` That said, we seem to pass locked-deps in our bootstrap args, as upstream CI does at https://github.com/rust-lang/rust/blob/503dce33e2e2a5d2fe978b2723ab2a994cc27472/src/ci/run.sh#L66. [sam: Include an example.] Bug: https://github.com/unicode-org/icu4x/issues/7190 Signed-off-by: Alfred Wingate <parona@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
2025-11-05dev-lang/rust: Add patch fixing bootstrap of Rust 1.90.0 with 1.90.0Michal Rostecki
Bug: https://bugs.gentoo.org/963657 Signed-off-by: Michal Rostecki <vadorovsky@protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44468 Closes: https://github.com/gentoo/gentoo/pull/44468 Signed-off-by: Sam James <sam@gentoo.org>
2025-11-04dev-*/*: update for virtual/zlibMichał Górny
Update done using: ``` git grep -l sys-libs/zlib dev-* | xargs sed -i -e s@sys-libs/zlib@virtual/zlib@g git diff --name-only | xargs copybump git diff --name-only | xargs grep -l PYTHON_COMPAT | xargs gpy-impl -@dead pkgcheck scan --commits -c SourcingCheck,VisibilityCheck --exit error ``` Followed by manual revert in dev-python/zlib-ng where it accidentally caught sys-libs/zlib-ng dependencies. Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-10-31dev-lang/rust: drop 1.90.0Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-10-31dev-lang/rust: drop 1.91.0_beta20251009Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-10-31dev-lang/rust: link to wiki bump notesSam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-10-31dev-lang/rust: add TODO for optimized-compiler-builtins for system-llvmSam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-10-31dev-lang/rust: add 1.91.0Sam James
As discussed in bug #963657, I've changed RUST_PATCH_VER to use _p* rather than -rN which makes it painful to revbump Rust for any other reason. I haven't made any actual changes to fix the linked bug though. Bug: https://bugs.gentoo.org/963657 Signed-off-by: Sam James <sam@gentoo.org>
2025-10-31dev-lang/rust: re-sync 1.91.0_beta* with 1.90.0 and 9999Sam James
The wasm changes got lost somewhere. Signed-off-by: Sam James <sam@gentoo.org>
2025-10-31dev-lang/rust: drop 1.91.0_beta20250928Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-10-26dev-lang/rust: fix bootstrap build under llvm profileZ. Liu
When bootstrapping Rust with the llvm profile (both glibc and musl), the build fails at the mrustc stage due to two issues related to C++ standard library handling. 1. Compilation failure When llvm-core/llvm is built with clang, 'llvm-config --cxxflags' includes '-stdlib=libc++', but not when built with GCC. But under musl profile, GCC has a known bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122409) in handling the '-stdlib=libc++' option. It fails to search '/usr/include/c++/v1', causing standard headers such as <cstddef> to be missing unless the include path is manually specified via '-I/usr/include/c++/v1'. This patch fixes the issue by wrapping llvm-config calls and explicitly appending libc++'s header path whenever '-stdlib=libc++' is detected. Below is the relevant error log: > Calling /var/tmp/portage/dev-lang/rust-1.74.1-r101/work/bootstrap/mrustc-stage0/rustc-build/build_rustc_llvm_run failed (see /var/tmp/portage/dev-lang/rust-1.74.1-r101/work/bootstrap/mrustc-stage0/rustc-build/build_rustc_llvm.txt_failed.txt for stdout) /var/tmp/portage/dev-lang/rust-1.74.1-r101/work/bootstrap/mrustc-stage0/rustc-build/build_rustc_llvm.txt_failed.txt > running: "x86_64-pc-linux-musl-g++" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-O2" "-pipe" "-I/usr/lib/llvm/17/include" "-std=c++17" "-stdlib=libc++" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_AMDGPU" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_AVR" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_BPF" "-DLLVM_COMPONENT_COVERAGE" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LOONGARCH" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_RISCV" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-o" "/var/tmp/portage/dev-lang/rust-1.74.1-r101/work/bootstrap/mrustc-stage0/rustc-build/build_rustc_llvm/llvm-wrapper/PassWrapper.o" "-c" "llvm-wrapper/PassWrapper.cpp" > cargo:warning=llvm-wrapper/PassWrapper.cpp:3:10: fatal error: cstddef: No such file or directory > cargo:warning= 3 | #include <cstddef> > cargo:warning= | ^~~~~~~~~ > cargo:warning=compilation terminated. > exit status: 1 2. Linker failure Found on llvm profile for both glibc and musl if llvm-core/llvm is built by GCC. The bundled llvm is always built by gcc because bootstrap with murst requires gcc. Under the llvm profile `LLVM_USE_LIBCXX=1` is defined, causing Rust build scripts to link with `-lc++` instead of `-lstdc++`. Since mrustc’s g++-compiled objects depend on libstdc++, linking fails with (glibc): > /.../x86_64-pc-linux-musl/bin/ld: /var/tmp/portage/dev-lang/rust-1.74.1-r101/work/bootstrap/mrustc-stage0/rustc-build/build_rustc_llvm/libllvm-wrapper.a(PassWrapper.o): undefined reference to symbol '_ZNSt6localeD1Ev@@GLIBCXX_3.4' > /.../x86_64-pc-linux-musl/bin/ld: /usr/lib/gcc/x86_64-pc-linux-musl/15/libstdc++.so.6: error adding symbols: DSO missing from command line or (musl): > /.../x86_64-pc-linux-musl/bin/ld: warning: x86_64.o: missing .note.GNU-stack section implies executable stack > /.../x86_64-pc-linux-musl/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker > /.../x86_64-pc-linux-musl/bin/ld: /var/tmp/portage/dev-lang/rust-1.74.1-r101/work/bootstrap/mrustc-stage0/rustc-build/build_rustc_llvm/libllvm-wrapper.a(PassWrapper.o): in function `std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes> >::operator--()': > /usr/lib/gcc/x86_64-pc-linux-musl/14/include/g++-v14/bits/stl_tree.h:298:(.text._ZNSt8_Rb_treeImSt4pairIKmN4llvm11GlobalValue12LinkageTypesEESt10_Select1stIS5_ESt4lessImESaIS5_EE24_M_get_insert_unique_posERS1_.isra.0+0x93): undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' Fix by unsetting `LLVM_USE_LIBCXX` during bootstrap, ensuring that the build links against libstdc++ instead of libc++. See the relevant Rust code in `compiler/rustc_llvm/build.rs`. Note: llvm-config may refer to the bundled LLVM if USE="-system-llvm", so we avoid relying on tc-get-cxx-stdlib in this context. Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44129 Closes: https://github.com/gentoo/gentoo/pull/44129 Signed-off-by: Sam James <sam@gentoo.org>
2025-10-20dev-lang/rust: don't try to delete new JSON target fileSam James
etc/target-spec-json-schema.json now gets installed by Rust but gets caught by the sanity check we have for cleaning up bash-completion (which gets handled by dev-lang/rust-common). It's now expected to have something left in etc/, so cleanup the rmdir accordingly to just kill the bash-completion dir. Note that this JSON file doesn't seem appropriate for rust-common because: 1) it's generated (so would require us to build something to install it); 2) per the commit introducing it: > Because the schema is subject to change, you should always use the schema > from the version of rustc which you are passing the target to. > > The existence and name of this schema is, just like the properties of the > JSON specification, not stable and subject to change. Closes: https://bugs.gentoo.org/964416 Signed-off-by: Sam James <sam@gentoo.org>
2025-10-20dev-lang/rust: explain bash-completion rmSam James
This came up in the context of bug #964416 where someone was confused as to its purpose, so explain it. Bug: https://bugs.gentoo.org/689562 Bug: https://bugs.gentoo.org/689160 Bug: https://bugs.gentoo.org/964416 Signed-off-by: Sam James <sam@gentoo.org>
2025-10-11dev-lang/rust: add 1.91.0_beta20252009Matt Jolly
Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-10-10dev-lang/rust: apply `RUST_SYSROOTS` changes to 1.90.0Matt Jolly
Since 1.89.0 was already stable, dropped Michal's patch for that version and applied it here instead. Closes: https://github.com/gentoo/gentoo/pull/42060 Co-authored-by: Michal Rostecki <vadorovsky@protonmail.com> Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-10-10dev-lang/rust: Add `RUST_SYSROOTS` as `USE_EXPAND` variableMichal Rostecki
Add a new `USE_EXPAND` variable called `RUST_SYSROOTS` which allows to specify additional Rust sysroots to build. Rust sysroot is a directory which contains the prebuilt standard libraries (in form of `*.rlib` files) and utility binaries (e.g. `rust-objcopy`). This variable is limited to bare metal targets. Sysroot for targets not falling into that category contain a local copy of compiler runtime, libc and unwinder, so crossdev is a better fit for them. In this change, the only `RUST_SYSROOT` option is `wasm`, which enables build of a sysroot for `wasm32-unknown-unknown` target and replaces the former `wasm` USE flag. Signed-off-by: Michal Rostecki <vadorovsky@protonmail.com> Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-10-02dev-lang/rust: add 1.91.0Matt Jolly
Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-10-02dev-lang/rust: add 1.90.0Matt Jolly
Late is better than never, right? Closes: https://bugs.gentoo.org/963518 Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-09-20dev-lang/rust: Stabilize 1.89.0 ppc64, #963081Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-09-20dev-lang/rust: Stabilize 1.89.0 ppc, #963081Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-09-19dev-lang/rust: Stabilize 1.89.0 arm64, #963081Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-09-19dev-lang/rust: Stabilize 1.89.0 arm, #963081Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-09-19dev-lang/rust: Stabilize 1.89.0 amd64, #963081Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-09-19dev-lang/rust: Stabilize 1.89.0 x86, #963081Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-09-19dev-lang/rust: Stabilize 1.88.0 ppc, #961056Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-09-19dev-lang/rust: Stabilize 1.88.0 x86, #961056Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-09-02*/*: destable sparcArthur Zamarin
Result of running the command: grep --include="*.ebuild" -r . -e 'KEYWORDS=.*[" ]sparc' -l | xargs ekeyword ~sparc Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-08-08dev-lang/rust: add 1.89.0, drop 1.89.0_beta20250726Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-08-04dev-lang/rust: Stabilize 1.88.0 amd64, #961056Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-08-04dev-lang/rust: Stabilize 1.88.0 arm, #961056Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-08-04dev-lang/rust: Stabilize 1.88.0 ppc64, #961056Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-08-04dev-lang/rust: Stabilize 1.88.0 arm64, #961056Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-07-29dev-lang/rust: fix bootstrap.toml deprecation warningMatt Jolly
Move `rust.description` -> `build.description` See-also: https://github.com/rust-lang/rust/commit/31e612bd7b6adf411c1a470d961657d0d4654e54 Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-07-29dev-lang/rust: move patches from files/ to git repoMatt Jolly
Add reminder to ebuild to update the git repo and make a new tag as required instead of using filesdir: that's how we end up exceeding the limit; things are very rarely cleaned up here! Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-07-29dev-lang/rust: update 9999Matt Jolly
- Enable building with 1.89.0 - bootstrap.toml - `rust.description` -> `build.description` See-also: https://github.com/rust-lang/rust/commit/e7f5bbe7438019ac6af84ce4f8cc04ab2df8c744 Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-07-29dev-lang/rust: add 1.89.0_beta20250726Matt Jolly
Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-07-19dev-lang/rust: enable system-llvm by defaultSam James
As noted in 850d5e6b5cd12da2ad9bc37d3b21b87ef210c7f7, this is fine to do these days. Combined with the LLVM_TARGET fixes from earlier today, this should lead to a nice build-time improvement too. Closes: https://bugs.gentoo.org/735154 Signed-off-by: Sam James <sam@gentoo.org>
2025-07-19dev-lang/rust: match LLVM_TARGETSSam James
We already depend on the right LLVM targets but without =, but we need that as it's automagic otherwise. I'm not completely convinced we need it here, but my aim is to avoid breaking things and then improve more later. Bug: https://bugs.gentoo.org/735154 Bug: https://bugs.gentoo.org/767700 Bug: https://bugs.gentoo.org/768267 Signed-off-by: Sam James <sam@gentoo.org>
2025-06-27dev-lang/rust: add 1.88.0Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-06-23dev-lang/rust: drop 1.88.0_beta20250526Matt Jolly
Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-06-23dev-lang/rust: add 1.88.0_beta20250622Matt Jolly
Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-06-16dev-lang/rust: fix building '+wasm' on clang/lld system on 1.87.0Joonas Niilola
- sync changes from 1.86.0. Bug: https://bugs.gentoo.org/953956 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2025-06-16dev-lang/rust: Stabilize 1.87.0-r1 ppc, #958201Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-16dev-lang/rust: Stabilize 1.87.0-r1 sparc, #958201Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-16dev-lang/rust: Stabilize 1.87.0-r1 arm, #958201Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-15dev-lang/rust: Stabilize 1.87.0-r1 ppc64, #958201Arthur Zamarin
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-06-15dev-lang/rust: Stabilize 1.87.0-r1 x86, #958201Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-15dev-lang/rust: Stabilize 1.87.0-r1 arm64, #958201Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-15dev-lang/rust: Stabilize 1.87.0-r1 amd64, #958201Sam James
Signed-off-by: Sam James <sam@gentoo.org>