<div dir="ltr">Hi James,<div><br></div><div>I understand the <span style="color:rgb(50,50,50);white-space:nowrap;font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:16px">annoyance from '-target'. I can do something around this to override triple from '-march', but the trouble is how to define default value for OS and ABI? Now I can give 2 solutions:</span></div>
<div><span style="color:rgb(50,50,50);white-space:nowrap;font-family:Arial,宋体,微软雅黑;font-size:14px;line-height:16px"><br></span></div><div><font color="#323232" face="Arial, 宋体, 微软雅黑"><span style="line-height:16px;white-space:nowrap">A. Get OS and ABI from host triple. For example, If host triple is "x86_64-unknown-linux-gnu", then using '-march=armv8-a' without specifying '-target' will give '</span></font><span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;line-height:16px;white-space:nowrap">aarch64-unknown-linux-gnu</span><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑">'.</span></div>
<div><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑">B. Use "unknown" value for OS and ABI. Then </span><span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;line-height:16px;white-space:nowrap">'-march=armv8-a' equals to </span>'-target<span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;line-height:16px;white-space:nowrap">=aarch64', which represents</span><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑">  '</span><span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;line-height:16px;white-space:nowrap">aarch64-unknown-</span><span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;line-height:16px;white-space:nowrap">unknown</span><span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;line-height:16px;white-space:nowrap">'.</span></div>
<div><span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;line-height:16px;white-space:nowrap"><br></span></div><div><span style="color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑;line-height:16px;white-space:nowrap">For solution A, it can bring </span><font color="#323232" face="Arial, 宋体, 微软雅黑"><span style="line-height:16px;white-space:nowrap">convenience to user running same operation system on host and target device, but also introduce uncertain "environment flag" to command line, which may cause confusion when migrating build</span></font><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑"> system to other OS.</span></div>
<div><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑">For solution B, it seems more reasonable. But I doubt this kind of triple is really useful.</span></div><div><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑"><br>
</span></div><div><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑">Do you have any good idea?</span></div><div><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑"><br>
</span></div><div><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑">Regards,</span></div><div><span style="line-height:16px;white-space:nowrap;color:rgb(50,50,50);font-family:Arial,宋体,微软雅黑">Kevin</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-25 19:58 GMT+08:00 James Molloy <span dir="ltr"><<a href="mailto:james@jamesmolloy.co.uk" target="_blank">james@jamesmolloy.co.uk</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Kevin,<div class=""><div><br></div><div>> <span style="font-size:13px;font-family:arial,sans-serif">Because triple is necessary for clang and it have selected the </span><span style="font-size:13px;font-family:arial,sans-serif">architecture</span><span style="font-size:13px;font-family:arial,sans-serif">.</span></div>

<div><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div></div><div><span style="font-size:13px;font-family:arial,sans-serif">This is one of the worst parts about the Clang CLI for cross compilation at the moment. I'd really like, if we're changing the CLI, to allow users to remove it. For example, if I specify -march=armv7-a, it *shouldn't* need me to put "-target arm" before it to work!</span></div>

<div><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div><font face="arial, sans-serif">On a similar note, how does this proposal deal with instruction set selection? what does "-march=armv8-a" select-  AArch32 or AArch64? or is that expected to be handled by the "-target" (grim!)</font></div>

<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Cheers,</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">James</font></div></div>

<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On 25 June 2014 09:02, Kevin Qin <span dir="ltr"><<a href="mailto:kevinqindev@gmail.com" target="_blank">kevinqindev@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr">Hi Tim,<div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-25 15:26 GMT+08:00 Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span>:<div>

<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Kevin,<br>
<br>
I assume you've looked at the GCC documentation in this area, since<br>
your ideas are very similar:<br>
<a href="https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html" target="_blank">https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html</a>. I actually<br>
think that looks like a rational set of conventions too.<br>
<br>
The main difference appears to be that GCC requires "armv8-a" in<br>
-march before any features, which I quite like. But even if I didn't<br>
it's close enough that we should follow anyway, for compatibility if<br>
nothing else.<br></blockquote></div><div>In my plan,  "armv8-a" "arm64" and "aarch64" are optional <span style="font-family:arial,sans-serif">architecture name</span> for '-march'. Because triple is necessary for clang and it have selected the <span style="font-family:arial,sans-serif">architecture</span>. If one day there's another <font face="arial, sans-serif">architecture is introduced, </font><span style="font-family:arial,sans-serif">architecture would be</span><font face="arial, sans-serif"> decided by triple at first, and can be overridden if </font><span style="font-family:arial,sans-serif;font-size:13.63636302947998px">architecture is specified by '-march'.</span></div>

<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><br>
> Last change is about '-mcpu'. If user don't care portability and only want<br>
> to get good performance on a certain CPU, he can use<br>
> '-mcpu=XXX+[no]featureA', which is an alias of '-march=default feature of<br>
> XXX+[no]featureA -mtune=XXX'. All default feature will get enabled and tune<br>
> target will be selected. So it's just a short hand of '-march' and '-mcpu'.<br>
<br>
</div>I think we should also specifically warn on the use of -mcpu:<br>
aggressively deprecate it on AArch64. AArch64 is a new architecture,<br>
there's no real excuse for using the legacy options.<br></blockquote></div><div>Agreed. </div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div><br>
> I think those changes can easily build binary running on multiple CPUs and<br>
> get more compatible with gcc. Is this new proposal reasonable?<br>
<br>
</div>I like it!<br>
<br>
Cheers.<br>
<span><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Best Regards,<div><br></div><div>Kevin Qin</div></div>
</font></span></div></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Best Regards,<div><br></div><div>Kevin Qin</div></div>
</div>