Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 911389 Details for
Bug 943706
dev-lang/rust: incomplete bootstrap path
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
brief old rust -> slotted rust porting guide
file_943706.txt (text/plain), 2.89 KB, created by
Matt Jolly
on 2024-11-21 23:38:02 UTC
(
hide
)
Description:
brief old rust -> slotted rust porting guide
Filename:
MIME Type:
Creator:
Matt Jolly
Created:
2024-11-21 23:38:02 UTC
Size:
2.89 KB
patch
obsolete
>rust porting notes (a slightly butchered example for 1.54.0) > ># Do not do llvm-r1 / LLVM_COMPAT for < LLVM 16; instead drop ># use=system-llvm > ># First, Update rust.eclass with the new rust version. LLVM_RUST_MAP, RUST_SLOTS_ORDERED ># Then add dev-lang/rust-bin; this is basically just adding any required blockers, updating depends, etc ># Finally we can use rust-bin to bootstrap rust (n.b. If you have the previous minor version you can bootstrap using that) > >LLVM_COMPAT=( 12 ) # check https://releases.rs/docs/${PV}; not requried if <16 > >RUST_MAX_VER=${PV} ># It's fine if this is older than we support, the rust eclass will set it to the oldest supported version >RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" > ># If required for a crate that just doesn't work: >OVERRIDE_CRATES=( > openssl@0.10.35 > openssl-sys@0.9.65 >) > >inherit -bash_completion-r1 llvm-r1 rust cargo (if OVERRIDE_CRATES, else rust eclass is sufficient) > > >drop RUST_STAGE0_VERSION >S="${WORKDIR}/${MY_P}-src" # remove from below, fixup other variable ordering QA > >USE= drop system-bootstrap > >SLOT="${PV}" #AFTER LICENSE > ># llvm-r1 only >LLVM_DEPEND=() ># splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation >for _x in "${ALL_LLVM_TARGETS[@]}"; do > LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" ) >done >LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" ) >LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" ) > ># Slotted rust bdepends > >RDEPEND+= > dev-lang/rust-common > !dev-lang/rust:stable > !dev-lang/rust-bin:stable > >pre_build_checks() { > local M=5120 (4096 + 1024) > ... > drop system-bootstrap >} > ># Grab these from (probably) https://gitweb.gentoo.org/fork/llvm-project.git/log/llvm/include?h=gentoo-15.0.7-r7 as required ># We only need essential ones, they should stay the same across a llvm major ver >PATCHES=( > ... > "${FILESDIR}/llvm/##/foo.patch >) > >bootstrap_rust_version_check () { > # purge this >} > >pkg_setup() { > > - use system-bootstrap && bootstrap_rust_version_check > ... > llvm -> llvm-r1_pkg_setup (or drop) > rust_pkg_setup >} > >src_unpack() { > verify-sig_src_unpack > cargo_src_unpack > # Vendored sources here override crates-io sources from cargo eclass. > # Just chop the head off the config file so that cargo stops complaining about it > # being defined in two places. We're only using the eclass for overrides anyway. > tail -n +7 "${ECARGO_HOME}"/config.toml > "${ECARGO_HOME}"/config.toml >} >src_configure() { > # if required (LLVM < 16, probably) > append-cxxflags -std=gnu++17 or gnu++14 > # force system-bootstrap path in conditionals >} > >src_install() { > -newbashcomp ... > > # Update this for slotted rust path > newenvd - "50${P}" <<-_EOF_ > LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}" > MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}" > . . . >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 943706
: 911389 |
915617