The full title is: Make rust target identification better in crossbeam and Rust generally As discussed on the oe-core email list: https://lore.kernel.org/openembedded-core/20220825104851.3258387-1-richard.purdie@linuxfoundation.org/T/#t "The upstreamable version of the patch would probably be something which splits the target names in no_atomics up into components and matched on subsections of it rather than the whole string." Likely change the 'unknown' section seen in: https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-utils to match anything in when used in: https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-utils/build.rs#L47 In this case, I'll start with opening an issue or better still sending a PR to: https://github.com/crossbeam-rs/crossbeam/
Use Rust globing to wildcard the vendor part of the triplet.
Alex K sent a patch and it has been merged upstream: https://github.com/crossbeam-rs/crossbeam/pull/922 but that's still not integrated as of rust-1.66: $ rg Ok.*target tmp/work/core2-64-poky-linux/rust/1.66.0-r0/rustc-1.66.0-src/vendor/crossbeam* tmp/work/core2-64-poky-linux/rust/1.66.0-r0/rustc-1.66.0-src/vendor/crossbeam-utils/build.rs 33: Ok(target) => target, ... $ cd ../crossbeam.git $ git log --oneline -1 e78e511e e78e511 When building for linux, replace all vendors with 'unknown' $ git tag --contains e78e511e crossbeam-skiplist-0.1.0 $ git branch -a --contains e78e511e * master remotes/origin/HEAD -> origin/master remotes/origin/cross remotes/origin/epoch-fix-sb-violations remotes/origin/master remotes/origin/skiplist-reexport remotes/origin/staging remotes/origin/taiki-e/scoped-thread2
This was fixed upstream by adding the function convert_custom_linux_target() and is part of rust-1.67 or ealier: $ rg convert_custom_linux_target tmp/work/core2-64-poky-linux/rust/1.67.0-r0/rustc-1.67.0-src/ tmp/work/core2-64-poky-linux/rust/1.67.0-r0/rustc-1.67.0-src/vendor/crossbeam-utils/build-common.rs 6:fn convert_custom_linux_target(target: String) -> String { tmp/work/core2-64-poky-linux/rust/1.67.0-r0/rustc-1.67.0-src/vendor/crossbeam-utils/build.rs 34: Ok(target) => convert_custom_linux_target(target), tmp/work/core2-64-poky-linux/rust/1.67.0-r0/rustc-1.67.0-src/vendor/crossbeam-epoch/build-common.rs 6:fn convert_custom_linux_target(target: String) -> String { tmp/work/core2-64-poky-linux/rust/1.67.0-r0/rustc-1.67.0-src/vendor/crossbeam-epoch/build.rs 22: Ok(target) => convert_custom_linux_target(target),