Glob to match bare-metal SuperH target triple in config.gcc seems wrong (sh*-superh-elf)?

John Scott <[email protected]>
Newsgroups gmane.linux.debian.ports.superh,gmane.comp.gcc.devel
Message-ID <[email protected]>
Hi,

I noticed at https://forge.sourceware.org/gcc/gcc-mirror/src/branch/master/gcc/config.gcc#L3399 that a glob expression "sh*-superh-elf" is used, and it's apparently intended to match embedded SuperH targets. However, the use of the "superh" token in the target triple appears to be serving as a manufacturer name. This looks like it could be a mistake; for example, I simply use the target triple "sh-elf" when building Debian's bare-metal toolchain, and so this clause wouldn't take effect. It's also weird to see SuperH used in the manufacturer field anyway (Hitachi and Renesas would be more fitting if this were intended).
On the other hand, such as at lines 3429 and 3466 there, it seems like "sh-superh-*" is intended to be the same as "sh4-*", but only if there is no suffix on the CPU name. For example, sh2-superh-elf wouldn't get this "magic" treatment of being promoted to sh4.

This is, at the very least, confusing, and if it's on purpose some in-line commentary would be helpful. Maybe there was a historical reason for this? Otherwise it would be fitting if the matching expression didn't include a manufacturer/vendor name because that is imprecise and doesn't make a lot of sense here.

Thanks
signature.asc (application/pgp-signature, 411 B)
-----BEGIN PGP SIGNATURE-----

iPsEABYKAKMWIQSiPzylvTnZ6xisfzWz9N0oYfTNugUCad2oj3IYaHR0cHM6Ly9q
b2huc2NvdHQubWUvLndlbGwta25vd24vbmkvc2hhLTI1Ni9zWUF3OTN6QUVrRkIy
RDREM1hOemRSeHEyMFBjNnByZGdtbEVWeXo0QUZRP2N0PWFwcGxpY2F0aW9uJTJG
cGdwLWtleXMSHGpzY290dEBwb3N0ZW8ubmV0AAoJELP03Shh9M26RhsA/iXjoDFY
E6dlGUlMDlCYHVzyElM+pK55Ze3gz77DehMtAP9EiVXBq4QnMtR5ijb5AyrofJu6
CIbr5ORKY0lQMpBQCQ==
=O+m+
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.