Add new redhat triple

Cody Maloney cmaloney at
Fri Jan 10 19:30:11 PST 2014

On Fri, Jan 10, 2014 at 5:54 AM, Rafael EspĂ­ndola
<rafael.espindola at> wrote:
> On 9 January 2014 17:56, Cody Maloney <cmaloney at> wrote:
> > Where / how should I add a test? (Browsing through the existing tests I
> > don't see one which looks like the right place to add another triple and
> > go).
> Probably the best place is test/Driver/linux-ld.c.
> > It's possible this has a little to do with how the particular GCC package
> > was built but that is using a standard RPM spec file just updated for 4.8.2,
> > so I suspect others might come across this and wonder why no c++ headers are
> > found.
> So this is not an official CentOS package?

Not an official package.

But current RedHat and CentOS call their host x86_64-redhat-linux-gnu,
and that's where, from what I can find, the triple got embedded into
GCC from.

There also isn't an official binary package of gcc 4.8 I can get at
from RedHat or CentOS which would answer what their official will ones

> > Is there any particular reason why the installation detection triple finding
> > code uses an explicit white-list (And then possibly a great many stat call
> > than doing a directory walk and then filter / scan for critical attributes?
> > It seems like that would make it more likely LLVM find something compatible
> > and try to just work if possible (even in the presence of new triples).
> > Since triples follow a fairly standard structure, it seems like a lot of the
> > LLVM triple parsing code could just be used to match the provided
> > architecture triple (rather than explicit whitelist).
> So your idea is to do a directory listing and check which entries
> "look like" triples? I could probably be made to work. Chandler, what
> do you think?

Yep, list the directory for things that look like triples, parse out
the relevant facts from those triples (architecture, kernel,
distribution, etc.) where clang cares, then pick the best one.

> Cheers,
> Rafael

More information about the cfe-commits mailing list