> + 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.
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.
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.
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.
I got to this eclass while adding amd64 musl targets, we need rework of the matches.