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

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to