<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14904</bug_id>
          
          <creation_ts>2022-08-25 19:10:03 +0000</creation_ts>
          <short_desc>Make rust target identification better in crossbeam</short_desc>
          <delta_ts>2023-02-07 19:51:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>4.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randy MacLeod">randy.macleod</reporter>
          <assigned_to name="Randy MacLeod">randy.macleod</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>93918</commentid>
    <comment_count>0</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-08-25 19:10:03 +0000</bug_when>
    <thetext>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

&quot;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.&quot;

Likely change the &apos;unknown&apos; 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&apos;ll start with opening an issue or better still sending a PR to:
   https://github.com/crossbeam-rs/crossbeam/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94254</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-10-27 14:02:59 +0000</bug_when>
    <thetext>Use Rust globing to wildcard the vendor part of the triplet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94595</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-12-22 17:37:46 +0000</bug_when>
    <thetext>Alex K sent a patch and it has been merged upstream:

https://github.com/crossbeam-rs/crossbeam/pull/922

but that&apos;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) =&gt; target,
...


$ cd ../crossbeam.git
$ git log --oneline -1 e78e511e
e78e511 When building for linux, replace all vendors with &apos;unknown&apos;

$ git tag --contains e78e511e
crossbeam-skiplist-0.1.0

$ git branch -a --contains e78e511e
* master
  remotes/origin/HEAD -&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94901</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-02-07 19:51:56 +0000</bug_when>
    <thetext>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) -&gt; 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) =&gt; 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) -&gt; 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) =&gt; convert_custom_linux_target(target),</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>