[cfe-dev] Clang is prefixed by triplet?

Richard Smith richard at metafoo.co.uk
Sun Dec 30 01:42:55 PST 2012


On Sat, Dec 29, 2012 at 11:27 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> On Dec 29, 2012, at 13:54 , Anton Korobeynikov <anton at korobeynikov.info> wrote:
>
>>> This is a bug. How can I fix this (i.e. end up with normal "clang.exe"
>>> without renaming everything after the fact)?
>> No, this is normal, since build != host / target and you're definitely
>> asking for cross-build.
>
> Right. We went through a few iterations of this with the Hexagon guys, who are actually using prefixes. In your case, the best thing to do is leave 'target' empty if you want unprefixed executables; this means "target matches host" and AFAIK matches GCC's behavior. (At least, it's what our autoconf does. Before 3.2, we had program prefixes completely disabled, so you couldn't even set one manually. Now you can set one manually, but you also get the default behavior of prefixing for "configurations that look like cross-compilers".)

I find this surprising -- this configuration *doesn't* look like it's
building a cross-compiler to me, since target=host. What's the
justification for a prefix here? Why would leaving target empty
("target matches host") give a different prefix from explicitly
setting target to match host?

I'm not saying this is wrong (and the "don't set a target" advice
seems good to me), but I don't think the explanation so far justifies
our behavior.




More information about the cfe-dev mailing list