<div class="gmail_quote">On Tue, Jan 24, 2012 at 6:46 AM, James Molloy <span dir="ltr"><<a href="mailto:james.molloy@arm.com">james.molloy@arm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">









<div lang="EN-GB" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Chandler,<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The patch looks good to me, although I’m wondering why Clang
needs to care what it was *<b>built</b>* to run on, as opposed to what it is
actually running on at runtime.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">For example, I compile on RHE3 for RHE3, then run on RHE5. Clang
should surely understand that it is hosted on RHE5 and act accordingly. So why
is this information needed as a build time constant?</span></p></div></div></blockquote><div><br>This was actually my biggest hesitation as well. It turns out that the only parts of the host triple we could actually use profitably are those which don't vary this much. We're mostly interested in linux vs. darwin vs. windows, and the architecture.</div>
<div><br></div><div>However, I've thought more about this overnight, and I wonder if I can deduce more of what I need from the target itself. Essentially, whenever we are targeting an architecture which might be provided by a '-m32' or '-m64' flag to another target's toolchain, we need to try both triples to locate the toolchain. This is true even if neither is the host, so my original plan doesn't actually work. =/</div>
<div><br></div><div>I'll just commit the cleanup parts of this w/o extending anything. We may someday want to at least know the host OS, but that day isn't today.</div><div><br></div><div><br></div><div>PS: The case I like to use as a thought exercise for the design here is an arm-hosted linux box with cross-toolchains for x86 and ppc64, but with the x86 cross toolchain capable of targeting x86-64 via '-m64', and the ppc64 cross toolchain being capable of targeting ppc32 with '-m32'.</div>
</div>