Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay dev-lang/rust: Update to 1.73.0 #1281

Merged
merged 5 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/updates/2023-10-17-rust-1.73.0-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- SDK: Rust ([1.73.0](https://github.com/rust-lang/rust/releases/tag/1.73.0))
64 changes: 30 additions & 34 deletions sdk_container/src/third_party/coreos-overlay/dev-lang/rust/Manifest

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
This patch bumps all libc dependencies and checksums to 0.2.146, which includes the fix for musl 1.2.4.

--- a/vendor/addr2line-0.20.0/Cargo.lock
+++ b/vendor/addr2line-0.20.0/Cargo.lock
@@ -246,9 +246,9 @@ checksum = "e2abad23fbc42b3700f2f279844d

[[package]]
name = "libc"
-version = "0.2.141"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "libtest-mimic"
--- a/vendor/backtrace-0.3.67/Cargo.lock
+++ b/vendor/backtrace-0.3.67/Cargo.lock
@@ -64,9 +64,9 @@ checksum = "dec7af912d60cdbd3677c1af9352

[[package]]
name = "libc"
-version = "0.2.138"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "libloading"
--- a/vendor/bstr/Cargo.lock
+++ b/vendor/bstr/Cargo.lock
@@ -34,9 +34,9 @@ dependencies = [

[[package]]
name = "libc"
-version = "0.2.138"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "memchr"
--- a/vendor/cranelift-jit/Cargo.lock
+++ b/vendor/cranelift-jit/Cargo.lock
@@ -224,9 +224,9 @@ dependencies = [

[[package]]
name = "libc"
-version = "0.2.141"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "log"
--- a/vendor/crossbeam-channel/Cargo.lock
+++ b/vendor/crossbeam-channel/Cargo.lock
@@ -50,9 +50,9 @@ dependencies = [

[[package]]
name = "libc"
-version = "0.2.141"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "num_cpus"
--- a/vendor/elasticlunr-rs/Cargo.lock
+++ b/vendor/elasticlunr-rs/Cargo.lock
@@ -555,9 +555,9 @@ checksum = "e2abad23fbc42b3700f2f279844d

[[package]]
name = "libc"
-version = "0.2.140"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "lindera"
--- a/vendor/handlebars/Cargo.lock
+++ b/vendor/handlebars/Cargo.lock
@@ -550,9 +550,9 @@ checksum = "e2abad23fbc42b3700f2f279844d

[[package]]
name = "libc"
-version = "0.2.140"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "lock_api"
--- a/vendor/icu_locid/Cargo.lock
+++ b/vendor/icu_locid/Cargo.lock
@@ -318,9 +318,9 @@ checksum = "e2abad23fbc42b3700f2f279844d

[[package]]
name = "libc"
-version = "0.2.141"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "litemap"
--- a/vendor/libffi/Cargo.lock
+++ b/vendor/libffi/Cargo.lock
@@ -10,9 +10,9 @@ checksum = "50d30906286121d95be3d479533b

[[package]]
name = "libc"
-version = "0.2.140"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "libffi"
--- a/vendor/terminal_size/Cargo.lock
+++ b/vendor/terminal_size/Cargo.lock
@@ -47,9 +47,9 @@ dependencies = [

[[package]]
name = "libc"
-version = "0.2.140"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "linux-raw-sys"
--- a/vendor/tracing-tree/Cargo.lock
+++ b/vendor/tracing-tree/Cargo.lock
@@ -100,9 +100,9 @@ checksum = "e2abad23fbc42b3700f2f279844d

[[package]]
name = "libc"
-version = "0.2.141"
+version = "0.2.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
+checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"

[[package]]
name = "log"
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<use>
<flag name="clippy">Install clippy, Rust code linter</flag>
<flag name="dist">Install dist tarballs (used for bootstrapping)</flag>
<flag name="lto">Optimize the build using Link Time Optimization (LTO)</flag>
<flag name="miri">Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly, sometimes is broken)</flag>
<flag name="nightly">Enable nightly (UNSTABLE) features (NOTE: it does not install nightly version, just enables features marked as nightly at time of release)</flag>
<flag name="parallel-compiler">Build a multi-threaded rustc (experimental, not tested by upstream)</flag>
<flag name="profiler">Build the profiler runtime and rust-demangler tool (needed for '-C profile-generate' or '-C instrument-coverage' codegen opts)</flag>
<flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
<flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (like rls)</flag>
<flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (language server)</flag>
<flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
<flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
<flag name="system-llvm">Use the system LLVM installation</flag>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

EAPI=8

# Flatcar: skip python3_12 which is not supported
PYTHON_COMPAT=( python3_{9..11} )
PYTHON_COMPAT=( python3_{9..12} )

inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
Expand All @@ -20,7 +19,7 @@ else
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi

# Flatcar: keep the patchlevel "0", no matter what it changes from Gentoo.
Expand All @@ -37,22 +36,23 @@ SRC_URI="
"

# keep in sync with llvm ebuild of the same version as bundled one.
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch Mips MSP430
NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore )
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
WebAssembly X86 XCore Xtensa )
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}

LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA"
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"

IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"

# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
# simultaneously.

# How to use it:
# List all the working slots in LLVM_VALID_SLOTS, newest first.
LLVM_VALID_SLOTS=( 16 )
LLVM_VALID_SLOTS=( 17 )
LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"

# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
Expand Down Expand Up @@ -166,13 +166,18 @@ RESTRICT="test"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc

PATCHES=(
"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch
"${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
"${FILESDIR}"/1.67.0-doc-wasm.patch
)

S="${WORKDIR}/${MY_P}-src"

clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
}

toml_usex() {
usex "${1}" true false
}
Expand Down Expand Up @@ -286,6 +291,12 @@ esetup_unwind_hack() {
}

src_prepare() {
# Clear vendor checksums for crates that we patched to bump libc.
for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
terminal_size tracing-tree; do
clear_vendor_checksums "${i}"
done

if ! use system-bootstrap; then
has_version sys-devel/gcc || esetup_unwind_hack
local rust_stage0_root="${WORKDIR}"/rust-stage0
Expand All @@ -299,7 +310,7 @@ src_prepare() {
}

src_configure() {
filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231

local rust_target="" rust_targets="" arch_cflags

Expand Down Expand Up @@ -604,7 +615,7 @@ src_configure() {
}

src_compile() {
RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
}

src_test() {
Expand Down Expand Up @@ -712,6 +723,7 @@ src_install() {
_EOF_

rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.old || die
rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die

# note: eselect-rust adds EROOT to all paths below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
=dev-embedded/u-boot-tools-2021.04_rc2 ~arm64
=dev-lang/nasm-2.15.05 ~arm64

# Accept unstable host Rust compilers
=dev-lang/rust-1.72.1 ~amd64 ~arm64
# Accept unstable host Rust compilers.
=dev-lang/rust-1.73.0 ~amd64 ~arm64

# Needed by arm64-native SDK.
=dev-lang/yasm-1.3.0-r1 ~arm64
Expand Down Expand Up @@ -95,4 +95,4 @@
=sys-process/procps-4.0.4 ~amd64 ~arm64

# Accept unstable host Rust compilers.
=virtual/rust-1.72.1 ~amd64 ~arm64
=virtual/rust-1.73.0 ~amd64 ~arm64
Loading
Loading