[LLVMdev] The Trouble with Triples

Renato Golin renato.golin at linaro.org
Thu Jul 9 03:10:01 PDT 2015


On 9 July 2015 at 11:02, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:
> Right, the problem is that the triple almost never contains enough information for a cross-compile (which, at a minimum, needs to know where the default sysroot is, where to find cross-linkers, and may also need to target a specific CPU variant or turn on soft float).  It works moderately well for trivial cases (e.g. targeting x86 Linux from x86-64 Linux, and even targeting ARM Linux from x86-64 Linux, as long as ARM Linux doesn’t mean Android or WebOS or some flavour of Linux that’s different from the host).

Yes, multi-arch / multi-lib kind of thing works well if we're only
talking about Linux.


> I would really like to completely remove the triple as something that can be decomposed into meaningful components and just have it become a name, which is only used by the front end to identify a configuration.

That's what I'm sceptical about. I don't think that's possible.

What we can (and should) do is to make it redundant. If we have a
better solution, and it's clearly beneficial, people will start using
it and maybe GNU tools could even implement that. Legacy systems will
still use triples forever, though.

cheers,
--renato




More information about the llvm-dev mailing list