<div dir="ltr">For the current project I'm working on (<a href="https://github.com/mono/CppSharp">https://github.com/mono/CppSharp</a>) having the flags to change the ABI based on a GCC version would be ideal. If there are no flags, this means we must implement some logic to change the calling conventions of methods manually to how they were pre-4.7. Should not be a lot of work but it'd be best to contain all the C++ ABI details inside Clang itself.<div>
<br></div><div>It's also likely the ABI will change in the future, so this would allow to support those changes while maintaining compatibility with earlier GCC versions.<br><div><br></div><div><div>By the way, we've been working around this MinGW ABI thiscall issue for a couple weeks so thanks for fixing it.</div>
</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 1:28 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It's worth noting that gcc chose *not* to support any ABI changing flags.<div><br></div><div>I'm in favor of avoiding flags here. We can simply document that clang 3.3 and earlier works with gcc 4.6 and earlier, and clang 3.4+ works with gcc 4.7+.</div>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 9, 2013 at 5:18 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mingw switched abis with the release of gcc 4.7<br>
(<a href="http://gcc.gnu.org/gcc-4.7/changes.html" target="_blank">http://gcc.gnu.org/gcc-4.7/changes.html</a>). The main change is that now<br>
mingw (like msvc) given thiscall calling convention to methods by<br>
default.<br>
<br>
I think the last bug blocking us to support the new abi has just been<br>
fixed. The question now is how to switch.<br>
<br>
The attached patches simply switch llvm and clang to the new ABI. This<br>
is similar to what gcc did on 4.7. The timing is also good as we will<br>
not build with 4.6 anymore when we switch to c++11.<br>
<br>
Is anyone depending on targeting the 4.6 mingw ABI even after we drop<br>
support for building with 4.6?<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>João Matos
</div>