Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671736 - rust-toolchain.eclass: improve CHOST matching
Summary: rust-toolchain.eclass: improve CHOST matching
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 679878 842246
  Show dependency tree
 
Reported: 2018-11-23 08:29 UTC by Dirkjan Ochtman (RETIRED)
Modified: 2024-02-11 06:01 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-23 08:29:15 UTC
> +  case ${CTARGET%%*-} in
> +    aarch64*)     echo aarch64-unknown-linux-gnu;;
> +    mips64*)      echo mips64-unknown-linux-gnuabi64;;
> +    powerpc64le*) echo powerpc64le-unknown-linux-gnu;;
> +    powerpc64*)   echo powerpc64-unknown-linux-gnu;;
> +    x86_64*)      echo x86_64-unknown-linux-gnu;;
> +    armv6j*s*)    echo arm-unknown-linux-gnueabi;;

mgorny wrote: Substring match for a single letter is a horrible idea.  It even fails with one of standard CHOSTs we have: armv6j-unknown-linux-musleabihf.
Comment 1 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-23 08:31:15 UTC
tt_1, since you previously added this, would you mind helping to improve this? I don't know enough about ARM to be of much use here.
Comment 2 tt_1 2018-11-23 08:39:10 UTC
Can you please explain what substring matches are, for the sake of the argument? 

Also, please mind you, there are no offical rust musl stages. And you can't take a glibc linked one to bootstrap from, so the argument where CHOST=armv6j-unknown-linux-musleabihf will fail doesn't convince me. 

Is there even a stage3 for that? I mean, last thing I read about armv6+musl is that it is a really hacky thing, which would require some pretty advanced busybox kungfu to make it even boot.
Comment 3 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-23 12:49:36 UTC
I think he means some of these CTARGET patterns aren't very specific and might match on things that aren't actually supported upstream. So my question is if we can make them more specific to guard against false positive matches.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-01-29 08:07:04 UTC
I got to this eclass while adding amd64 musl targets, we need rework of the matches.