<div dir="ltr">On 5 August 2013 14:44, Kal Conley <span dir="ltr"><<a href="mailto:kcconley@gmail.com" target="_blank">kcconley@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I figured out the normalization is done in llvm::sys::getDefaultTargetTriple. Changing the implementation to simply return LLVM_DEFAULT_TARGET_TRIPLE fixes the problem. I'm still not clear on why this normalization is done. Would it make sense to add a configure option to disable this normalization for cases where the target is known?<br>
</div></blockquote><div></div></div><br></div><div class="gmail_extra">I think this is more an emergent behaviour than design.</div><div class="gmail_extra"><br></div><div class="gmail_extra">It is good to normalize (or canonicalize) the triples, to make sure we pass the correct options down the sub-commands / sub-components of LLVM, but only as long as the canonicalized triple reflects correctly the target you're trying to.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I learnt the hard way that most of arm*-none-eabi were being converted to armv4t--none-eabi because they were missing, and most only worked when you set the cpu, fpu and abi manually on all stages, to guarantee that, even with a bogus triple, the behaviour would be expected. That was several years ago, much of that was fixed, but some odd cases still remain.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">This is also not specific to Clang, but the LLVM's Triple is also lacking, so both sides need serious review.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
Regarding the specific names (i386 instead of i586), this is again, historical. Some people think we should try to mimic GNU's triples as close as possible, others think we should abandon triples altogether and start with something else entirely. But the solution will probably be something else in between... I'm hoping to be able to have a look at it in the near future.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">cheers,</div><div class="gmail_extra">--renato</div></div>