<div dir="ltr"><div><div><div><div>Hi Yaron,<br><br></div>Yes I've update most of this myself without the updated patch from kai.<br></div><div>That's why is wasn't as clean.<br></div>Thanks for pointing out the one I missed.<br>
</div>I've just rebuilt and seh looks like it now works properly for mingw32 x86_64.<br><br><br></div><div>Thanks<br></div><div>Martell<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 15, 2014 at 9:11 PM, Yaron Keren <span dir="ltr"><<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.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="rtl"><div dir="ltr">Hi Martell,</div><div dir="ltr"><br></div><div dir="ltr">The page I linked is Kai Nacke page, note that the patch there is more updated than the 20140201 one in several locations, major changes are</div>


<div dir="ltr"><br></div><div dir="ltr">1) the test for MingW environment is now </div><div dir="ltr"><br></div><div dir="ltr">if (is64Bit && Triple.isWindowsGNUEnvironment())</div><div dir="ltr"><br></div><div dir="ltr">


the previous test wil cause a silent bug as the OS can't be MinGW anymore and the test is always false.</div><div dir="ltr"><br></div><div dir="ltr">2) isPrologLabel() was replaced by by isCFIInstruction()</div><div dir="ltr">


<br></div><div dir="ltr">the previous patch will cause a compilation failure against trunk, isPrologLabel() does not exist anymore.</div><div dir="ltr"><br></div><div dir="ltr">3) Small code changes in X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(const Triple &Triple) and more.</div>


<div dir="ltr"><br></div><div dir="ltr">The new patch (20140414) should apply to trunk.</div><div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div><div><br></div></div><div class="gmail_extra"><div dir="ltr">


<br><br><div class="gmail_quote">2014-04-15 22:11 GMT+03:00 Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span>:<div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0 .8ex;border-left:1px #ccc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex">


<div><div>Yaron<br><br>After looking at the code differences from the updated seh patch you linked me from kai<br></div>I have noticed that the only change from my patch is that I am using<br><br>X86RegisterInfo<br>
instead of<br>TargetRegisterInfo<br><br></div><div>So his patch looks good to me other than calling that virtual method which would cause a compile error.<br><br></div><div>On a side note doxygen is messing up the X86RegisterInfo class name because of the final word<br>



<a href="http://llvm.org/doxygen/classllvm_1_1final.html" target="_blank">http://llvm.org/doxygen/classllvm_1_1final.html</a><br></div><div><br></div><br><br><div><br></div></blockquote></div></div></div><div><div class="h5">
<div><div>

<div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Apr 15, 2014 at 7:59 PM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.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">Hi Reid,<br><br>TLS works for me with clang and the mingw64 headers to I assume that it is ready within LLVM.<br>I have just submitted a patch to llvm maillist from kai of <a href="http://redstar.de" target="_blank">redstar.de</a> for the seh that I updated to work on llvm-head.<br>




<br>With regard to the _WIN32 ifdefs a sysroot mingw32 compiler should never be generated on windows because that is the native platform.<br>We have all switched from doing that over at the mingw64 camp. <br><br>In the patch I have removed the <span style="font-family:arial,sans-serif;font-size:13px">Generic_GCC toolchain and replaced it with the MINGW Driver.<br>




<br><div>@@ -1967,10 +1970,7 @@</div><div>       case llvm::Triple::GNU:</div><div>         // FIXME: We need a MinGW toolchain.  Use the default Generic_GCC</div><div>         // toolchain for now as the default case would below otherwise.</div>




<div>-        if (Target.isOSBinFormatELF())</div><div>-          TC = new toolchains::Generic_ELF(*this, Target, Args);</div><div>-        else</div><div>-          TC = new toolchains::Generic_GCC(*this, Target, Args);</div>




<div>+        TC = new toolchains::MinGW(*this, Target, Args);<br><br>Many Thanks<span><font color="#888888"><br>Martell</font></span></div><br></span></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Apr 15, 2014 at 7:51 PM, 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">For TLS, that seems fine to commit after the LLVM TLS changes land.  Or is LLVM already ready?<div><br>



</div>
<div>Ditto for SEH.  It should land when LLVM is ready.  Otherwise I don't think it's interesting.</div>
<div><br></div><div>The toolchain one is interesting, and is closest to ready to land.  I don't think the _WIN32 ifdefs are correct.  On all platforms, we should use the sysroot if provided and search relative to the clang binary if not.</div>





<div><br></div><div>I'm not sure if the Generic_GCC toolchain is helpful here, but there might be some gcc detection logic there that's worth reusing.</div></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Tue, Apr 15, 2014 at 11:42 AM, Yaron Keren <span dir="ltr"><<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.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="rtl"><div dir="ltr">Hi Martell,</div><div dir="ltr"><br></div><div dir="ltr">For SEH support, the patch by Kai Nacke ( <a href="http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC" target="_blank">http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC</a> ) should also be required, not? </div>







<div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2014-04-15 21:32 GMT+03:00 Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span>:</div>







<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi <br><div><br>This is my first time using a mailing list so bare with me please.<br>
<br>Based on work done by ruben vb I have created a patch for clang that will find the include directories for the new windows-gnu triplet.<br>


</div><div>I have also enabled TLS which mingw64 supports and the introduction of SEH exceptions on the front end.<br><br></div><div>A patch will also be sent to the llvm mailing list for the backend.<br><br></div><div>Many Thanks<span><font color="#888888"><br>








</font></span></div><span><font color="#888888"><div>Martell<br></div></font></span></div>
<br></div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></div></div></div></div>
</blockquote></div><br></div>