summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jolly <kangie@gentoo.org>2024-11-12 07:12:24 +1000
committerMatt Jolly <kangie@gentoo.org>2024-11-12 09:40:15 +1000
commit349e9c05f6e7b9ee98f700c72f8023d1d3f61223 (patch)
tree981aea5727db5d7760c33c79ade00c0b4cf56722 /dev-lang/rust
parentrust.eclass: define `usedep` before its first usage (diff)
downloadgentoo-349e9c05f6e7b9ee98f700c72f8023d1d3f61223.tar.gz
gentoo-349e9c05f6e7b9ee98f700c72f8023d1d3f61223.tar.bz2
gentoo-349e9c05f6e7b9ee98f700c72f8023d1d3f61223.zip
dev-lang/rust: drop USE=system-bootstrap
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>
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/rust-1.71.1-r100.ebuild52
-rw-r--r--dev-lang/rust/rust-1.74.1-r100.ebuild60
-rw-r--r--dev-lang/rust/rust-1.75.0-r100.ebuild60
-rw-r--r--dev-lang/rust/rust-1.77.1-r100.ebuild60
-rw-r--r--dev-lang/rust/rust-1.79.0-r100.ebuild60
-rw-r--r--dev-lang/rust/rust-1.80.1-r100.ebuild60
-rw-r--r--dev-lang/rust/rust-1.81.0-r100.ebuild61
-rw-r--r--dev-lang/rust/rust-1.82.0-r100.ebuild58
8 files changed, 26 insertions, 445 deletions
diff --git a/dev-lang/rust/rust-1.71.1-r100.ebuild b/dev-lang/rust/rust-1.71.1-r100.ebuild
index 66741c10fed6..4207e971e6a8 100644
--- a/dev-lang/rust/rust-1.71.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.71.1-r100.ebuild
@@ -6,8 +6,6 @@ EAPI=8
LLVM_COMPAT=( 16 )
PYTHON_COMPAT=( python3_{10..12} )
-# We only need this for system-bootstrap
-RUST_OPTIONAL=1
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
@@ -25,15 +23,12 @@ else
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC}
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
S="${WORKDIR}/${MY_P}-src"
@@ -62,7 +57,6 @@ BDEPEND="${PYTHON_DEPS}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- system-bootstrap? ( ${RUST_DEPEND} )
!system-llvm? (
>=dev-build/cmake-3.13.4
app-alternatives/ninja
@@ -147,7 +141,7 @@ toml_usex() {
}
pre_build_checks() {
- local M=8192
+ local M=9216
# multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
@@ -170,7 +164,6 @@ pre_build_checks() {
M=$(( 15 * ${M} / 10 ))
fi
eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
M=$(( $(usex doc 256 0) + ${M} ))
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -200,7 +193,7 @@ pkg_setup() {
export LIBGIT2_NO_PKG_CONFIG=1 #749381
- use system-bootstrap && rust_pkg_setup
+ rust_pkg_setup
if use system-llvm; then
llvm-r1_pkg_setup
@@ -211,38 +204,6 @@ pkg_setup() {
fi
}
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- has_version sys-devel/gcc || esetup_unwind_hack
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
src_configure() {
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
@@ -270,14 +231,7 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer"'
use rust-src && tools+=',"src"'
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(${RUSTC} --print --sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
# in case of prefix it will be already prefixed, as --print sysroot returns full path
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
diff --git a/dev-lang/rust/rust-1.74.1-r100.ebuild b/dev-lang/rust/rust-1.74.1-r100.ebuild
index 5e9c19aaab5e..162ce69c5340 100644
--- a/dev-lang/rust/rust-1.74.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.74.1-r100.ebuild
@@ -6,8 +6,6 @@ EAPI=8
LLVM_COMPAT=( 17 )
PYTHON_COMPAT=( python3_{10..12} )
-# We only need this for system-bootstrap
-RUST_OPTIONAL=1
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
@@ -25,15 +23,12 @@ else
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC}
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
S="${WORKDIR}/${MY_P}-src"
@@ -64,7 +59,6 @@ BDEPEND="${PYTHON_DEPS}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- system-bootstrap? ( ${RUST_DEPEND} )
!system-llvm? (
>=dev-build/cmake-3.13.4
app-alternatives/ninja
@@ -154,7 +148,7 @@ toml_usex() {
}
pre_build_checks() {
- local M=8192
+ local M=9216
# multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
@@ -177,7 +171,6 @@ pre_build_checks() {
M=$(( 15 * ${M} / 10 ))
fi
eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
M=$(( $(usex doc 256 0) + ${M} ))
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -212,14 +205,13 @@ pkg_setup() {
export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
- use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
use "llvm_targets_${cross_llvm_target}" || \
die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
fi
- use system-bootstrap && rust_pkg_setup
+ rust_pkg_setup
if use system-llvm; then
llvm-r1_pkg_setup
@@ -230,45 +222,6 @@ pkg_setup() {
fi
}
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- # Clear vendor checksums for crates that we patched to bump libc.
- # NOTE: refresh this on each bump.
- #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
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
src_configure() {
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
@@ -296,14 +249,7 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer"'
use rust-src && tools+=',"src"'
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(${RUSTC} --print --sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
# in case of prefix it will be already prefixed, as --print sysroot returns full path
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
diff --git a/dev-lang/rust/rust-1.75.0-r100.ebuild b/dev-lang/rust/rust-1.75.0-r100.ebuild
index 447ec8612dd5..ae3ba52f7c38 100644
--- a/dev-lang/rust/rust-1.75.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.75.0-r100.ebuild
@@ -6,8 +6,6 @@ EAPI=8
LLVM_COMPAT=( 17 )
PYTHON_COMPAT=( python3_{10..12} )
-# We only need this for system-bootstrap
-RUST_OPTIONAL=1
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
@@ -25,15 +23,12 @@ else
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
DESCRIPTION="Language empowering everyone to build reliable and efficient software"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC}
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
S="${WORKDIR}/${MY_P}-src"
@@ -63,7 +58,6 @@ BDEPEND="${PYTHON_DEPS}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- system-bootstrap? ( ${RUST_DEPEND} )
!system-llvm? (
>=dev-build/cmake-3.13.4
app-alternatives/ninja
@@ -156,7 +150,7 @@ toml_usex() {
}
pre_build_checks() {
- local M=8192
+ local M=9216
# multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
@@ -179,7 +173,6 @@ pre_build_checks() {
M=$(( 15 * ${M} / 10 ))
fi
eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
M=$(( $(usex doc 256 0) + ${M} ))
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -214,14 +207,13 @@ pkg_setup() {
export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
- use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
use "llvm_targets_${cross_llvm_target}" || \
die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
fi
- use system-bootstrap && rust_pkg_setup
+ rust_pkg_setup
if use system-llvm; then
llvm-r1_pkg_setup
@@ -232,45 +224,6 @@ pkg_setup() {
fi
}
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- # Clear vendor checksums for crates that we patched to bump libc.
- # NOTE: refresh this on each bump.
- #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
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
src_configure() {
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
@@ -298,14 +251,7 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer"'
use rust-src && tools+=',"src"'
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(${RUSTC} --print --sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
# in case of prefix it will be already prefixed, as --print sysroot returns full path
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
diff --git a/dev-lang/rust/rust-1.77.1-r100.ebuild b/dev-lang/rust/rust-1.77.1-r100.ebuild
index 581eabab194f..649a30d32e85 100644
--- a/dev-lang/rust/rust-1.77.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.77.1-r100.ebuild
@@ -6,8 +6,6 @@ EAPI=8
LLVM_COMPAT=( 17 )
PYTHON_COMPAT=( python3_{10..12} )
-# We only need this for system-bootstrap
-RUST_OPTIONAL=1
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
@@ -25,15 +23,12 @@ else
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC}
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
S="${WORKDIR}/${MY_P}-src"
@@ -63,7 +58,6 @@ BDEPEND="${PYTHON_DEPS}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- system-bootstrap? ( ${RUST_DEPEND} )
!system-llvm? (
>=dev-build/cmake-3.13.4
app-alternatives/ninja
@@ -154,7 +148,7 @@ toml_usex() {
}
pre_build_checks() {
- local M=8192
+ local M=9216
# multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
@@ -177,7 +171,6 @@ pre_build_checks() {
M=$(( 15 * ${M} / 10 ))
fi
eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
M=$(( $(usex doc 256 0) + ${M} ))
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -212,14 +205,13 @@ pkg_setup() {
export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
- use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
use "llvm_targets_${cross_llvm_target}" || \
die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
fi
- use system-bootstrap && rust_pkg_setup
+ rust_pkg_setup
if use system-llvm; then
llvm-r1_pkg_setup
@@ -230,45 +222,6 @@ pkg_setup() {
fi
}
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- # Clear vendor checksums for crates that we patched to bump libc.
- # NOTE: refresh this on each bump.
- #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
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
src_configure() {
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
@@ -296,14 +249,7 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
use rust-src && tools+=',"src"'
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(${RUSTC} --print --sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
# in case of prefix it will be already prefixed, as --print sysroot returns full path
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
diff --git a/dev-lang/rust/rust-1.79.0-r100.ebuild b/dev-lang/rust/rust-1.79.0-r100.ebuild
index 5b7a5c245acf..2b16ec509faa 100644
--- a/dev-lang/rust/rust-1.79.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.79.0-r100.ebuild
@@ -6,8 +6,6 @@ EAPI=8
LLVM_COMPAT=( 18 )
PYTHON_COMPAT=( python3_{10..13} )
-# We only need this for system-bootstrap
-RUST_OPTIONAL=1
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
@@ -25,15 +23,12 @@ else
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC}
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
S="${WORKDIR}/${MY_P}-src"
@@ -63,7 +58,6 @@ BDEPEND="${PYTHON_DEPS}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- system-bootstrap? ( ${RUST_DEPEND} )
!system-llvm? (
>=dev-build/cmake-3.13.4
app-alternatives/ninja
@@ -154,7 +148,7 @@ toml_usex() {
}
pre_build_checks() {
- local M=8192
+ local M=9216
# multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
@@ -177,7 +171,6 @@ pre_build_checks() {
M=$(( 15 * ${M} / 10 ))
fi
eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
M=$(( $(usex doc 256 0) + ${M} ))
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -212,14 +205,13 @@ pkg_setup() {
export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
- use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
use "llvm_targets_${cross_llvm_target}" || \
die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
fi
- use system-bootstrap && rust_pkg_setup
+ rust_pkg_setup
if use system-llvm; then
llvm-r1_pkg_setup
@@ -230,45 +222,6 @@ pkg_setup() {
fi
}
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- # Clear vendor checksums for crates that we patched to bump libc.
- # NOTE: refresh this on each bump.
- #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
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
src_configure() {
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
@@ -296,14 +249,7 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
use rust-src && tools+=',"src"'
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(${RUSTC} --print --sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
# in case of prefix it will be already prefixed, as --print sysroot returns full path
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
diff --git a/dev-lang/rust/rust-1.80.1-r100.ebuild b/dev-lang/rust/rust-1.80.1-r100.ebuild
index 5fc784e616a9..ac7cf1cda9dc 100644
--- a/dev-lang/rust/rust-1.80.1-r100.ebuild
+++ b/dev-lang/rust/rust-1.80.1-r100.ebuild
@@ -6,8 +6,6 @@ EAPI=8
LLVM_COMPAT=( 18 )
PYTHON_COMPAT=( python3_{10..13} )
-# We only need this for system-bootstrap
-RUST_OPTIONAL=1
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
@@ -25,15 +23,12 @@ else
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC}
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
S="${WORKDIR}/${MY_P}-src"
@@ -63,7 +58,6 @@ BDEPEND="${PYTHON_DEPS}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- system-bootstrap? ( ${RUST_DEPEND} )
!system-llvm? (
>=dev-build/cmake-3.13.4
app-alternatives/ninja
@@ -153,7 +147,7 @@ toml_usex() {
}
pre_build_checks() {
- local M=8192
+ local M=9216
# multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
@@ -176,7 +170,6 @@ pre_build_checks() {
M=$(( 15 * ${M} / 10 ))
fi
eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
M=$(( $(usex doc 256 0) + ${M} ))
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -211,14 +204,13 @@ pkg_setup() {
export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
- use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
use "llvm_targets_${cross_llvm_target}" || \
die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
fi
- use system-bootstrap && rust_pkg_setup
+ rust_pkg_setup
if use system-llvm; then
llvm-r1_pkg_setup
@@ -229,45 +221,6 @@ pkg_setup() {
fi
}
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- # Clear vendor checksums for crates that we patched to bump libc.
- # NOTE: refresh this on each bump.
- #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
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
src_configure() {
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
@@ -295,14 +248,7 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
use rust-src && tools+=',"src"'
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(${RUSTC} --print --sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
# in case of prefix it will be already prefixed, as --print sysroot returns full path
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
diff --git a/dev-lang/rust/rust-1.81.0-r100.ebuild b/dev-lang/rust/rust-1.81.0-r100.ebuild
index 996971d4956d..45a3b156c9e4 100644
--- a/dev-lang/rust/rust-1.81.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.81.0-r100.ebuild
@@ -6,8 +6,6 @@ EAPI=8
LLVM_COMPAT=( 18 )
PYTHON_COMPAT=( python3_{10..13} )
-# We only need this for system-bootstrap
-RUST_OPTIONAL=1
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
@@ -26,14 +24,12 @@ else
fi
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
-
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC}
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
S="${WORKDIR}/${MY_P}-src"
@@ -47,7 +43,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
-IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler 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 rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
LLVM_DEPEND=()
# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
@@ -63,7 +59,6 @@ BDEPEND="${PYTHON_DEPS}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- system-bootstrap? ( ${RUST_DEPEND} )
!system-llvm? (
>=dev-build/cmake-3.13.4
app-alternatives/ninja
@@ -156,7 +151,7 @@ toml_usex() {
}
pre_build_checks() {
- local M=8192
+ local M=9216
# multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
@@ -179,7 +174,6 @@ pre_build_checks() {
M=$(( 15 * ${M} / 10 ))
fi
eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
M=$(( $(usex doc 256 0) + ${M} ))
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -214,14 +208,13 @@ pkg_setup() {
export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
- use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
use "llvm_targets_${cross_llvm_target}" || \
die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
fi
- use system-bootstrap && rust_pkg_setup
+ rust_pkg_setup
if use system-llvm; then
llvm-r1_pkg_setup
@@ -232,45 +225,6 @@ pkg_setup() {
fi
}
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
-src_prepare() {
- # Clear vendor checksums for crates that we patched to bump libc.
- # NOTE: refresh this on each bump.
- #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
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
src_configure() {
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
@@ -298,14 +252,7 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
use rust-src && tools+=',"src"'
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(${RUSTC} --print --sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
# in case of prefix it will be already prefixed, as --print sysroot returns full path
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
diff --git a/dev-lang/rust/rust-1.82.0-r100.ebuild b/dev-lang/rust/rust-1.82.0-r100.ebuild
index 0c12c72b72f2..fc2eefa52e7c 100644
--- a/dev-lang/rust/rust-1.82.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.82.0-r100.ebuild
@@ -6,8 +6,6 @@ EAPI=8
LLVM_COMPAT=( 19 )
PYTHON_COMPAT=( python3_{10..13} )
-# We only need this for system-bootstrap
-RUST_OPTIONAL=1
RUST_MAX_VER=${PV}
RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0"
@@ -25,15 +23,12 @@ else
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
SRC_URI="
https://static.rust-lang.org/dist/${SRC}
verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
"
S="${WORKDIR}/${MY_P}-src"
@@ -47,7 +42,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV}"
-IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler 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 rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
LLVM_DEPEND=()
# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
@@ -63,7 +58,6 @@ BDEPEND="${PYTHON_DEPS}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- system-bootstrap? ( ${RUST_DEPEND} )
!system-llvm? (
>=dev-build/cmake-3.13.4
app-alternatives/ninja
@@ -153,7 +147,7 @@ toml_usex() {
}
pre_build_checks() {
- local M=8192
+ local M=9216
# multiply requirements by 1.3 if we are doing x86-multilib
if use amd64; then
M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
@@ -176,7 +170,6 @@ pre_build_checks() {
M=$(( 15 * ${M} / 10 ))
fi
eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
M=$(( $(usex doc 256 0) + ${M} ))
CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
}
@@ -211,14 +204,13 @@ pkg_setup() {
export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
- use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
use "llvm_targets_${cross_llvm_target}" || \
die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
fi
- use system-bootstrap && rust_pkg_setup
+ rust_pkg_setup
if use system-llvm; then
llvm-r1_pkg_setup
@@ -229,33 +221,7 @@ pkg_setup() {
fi
}
-esetup_unwind_hack() {
- # https://bugs.gentoo.org/870280
- # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
- # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
- # the whole idea is for stage0 to bootstrap with fake libgcc_s.
- # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
- local fakelib="${T}/fakelib"
- mkdir -p "${fakelib}" || die
- # we need both symlinks, one for cargo runtime, other for linker.
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
- ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
- export LD_LIBRARY_PATH="${fakelib}"
- export RUSTFLAGS+=" -L${fakelib}"
- # this is a literally magic variable that gets through cargo cache, without it some
- # crates ignore RUSTFLAGS.
- # this variable can not contain leading space.
- export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
-}
-
src_prepare() {
- # Clear vendor checksums for crates that we patched to bump libc.
- # NOTE: refresh this on each bump.
- #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
-
# Rust baselines to Pentium4 on x86, this patch lowers the baseline to i586 when sse2 is not set.
if use x86; then
if ! use cpu_flags_x86_sse2; then
@@ -264,15 +230,6 @@ src_prepare() {
fi
fi
- if ! use system-bootstrap; then
- has_version sys-devel/gcc || esetup_unwind_hack
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
default
}
@@ -303,14 +260,7 @@ src_configure() {
use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"'
use rust-src && tools+=',"src"'
- local rust_stage0_root
- if use system-bootstrap; then
- local printsysroot
- printsysroot="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
- rust_stage0_root="${printsysroot}"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
+ local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")"
# in case of prefix it will be already prefixed, as --print sysroot returns full path
[[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"