<div dir="rtl"><div dir="ltr">OK, there are sys-root include and library directories. </div><div dir="ltr">Try the attached patch which adds both of them.</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-07-13 8:57 GMT+03:00 İsmail Dönmez <span dir="ltr"><<a href="mailto:ismail@donmez.ws" target="_blank">ismail@donmez.ws</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Please see the attached log files:<br>
<br>
try2.log.txt: Looks like /usr/include is in include path messing everything<br>
<br>
try3.log.txt: /usr/x86_64-w64-mingw32/sys-root/mingw/include must be<br>
added as C include path<br>
<br>
try4.log.txt: Even after adding<br>
/usr/x86_64-w64-mingw32/sys-root/mingw/include as include path it<br>
doesn't find most libraries.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Sun, Jul 12, 2015 at 9:20 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>> wrote:<br>
> It should just work... on non-Windows the patch makes the mingw toolchain in<br>
> clang use /usr/lib64/gcc/$ARCH/$VER and /usr as the base paths instead of<br>
> searching. This makes more sense on Linux then the Windows logic of looking<br>
> for gcc.exe.<br>
><br>
> You can still override this with --sysroot but should not be required.<br>
><br>
><br>
><br>
><br>
> 2015-07-12 21:12 GMT+03:00 İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>>:<br>
>><br>
>> Building it now, how shall I test it? With gcc in $PATH or with --sysroot<br>
>> ?<br>
>><br>
>> On Sun, Jul 12, 2015 at 9:05 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>><br>
>> wrote:<br>
>> > Wow, mingw-w64 distributions has endless variations of include and<br>
>> > library<br>
>> > locations.<br>
>> > On base of the current SVN (without any previous patches I sent), try<br>
>> > the<br>
>> > attached patch.<br>
>> ><br>
>> ><br>
>> > 2015-07-12 18:33 GMT+03:00 İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>>:<br>
>> >><br>
>> >> Hi,<br>
>> >><br>
>> >> See the attached log.<br>
>> >><br>
>> >> On Sun, Jul 12, 2015 at 6:15 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > On Ubuntu 14.04 it's not the same location, it's in /usr/lib/gcc and<br>
>> >> > not<br>
>> >> > /usr/lib64/gcc<br>
>> >> ><br>
>> >> > #include <...> search starts here:<br>
>> >> >  /usr/include/c++/4.8<br>
>> >> >  /usr/include/c++/4.8/x86_64-w64-mingw32<br>
>> >> >  /usr/include/c++/4.8/backward<br>
>> >> >  /usr/lib/gcc/x86_64-w64-mingw32/4.8/include<br>
>> >> >  /usr/lib/gcc/x86_64-w64-mingw32/4.8/include-fixed<br>
>> >> ><br>
>> >> ><br>
>> >> > /usr/lib/gcc/x86_64-w64-mingw32/4.8/../../../../x86_64-w64-mingw32/include<br>
>> >> > End of search list.<br>
>> >> > GNU C++ (GCC) version 4.8.2 (x86_64-w64-mingw32)<br>
>> >> ><br>
>> >> > Can you send the full output of<br>
>> >> ><br>
>> >> > /usr/bin/x86_64-w64-mingw32-g++ -c -v a.cpp<br>
>> >> ><br>
>> >> > where a.cpp is some source file?<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > 2015-07-12 16:47 GMT+03:00 İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>>:<br>
>> >> >><br>
>> >> >> [snip]<br>
>> >> >><br>
>> >> >> > P.S: The problem on Cygwin side seems to be that my toolchain is<br>
>> >> >> > missing libgcc_s.a and this seems to be working fine since I build<br>
>> >> >> > the<br>
>> >> >> > whole toolchain as static. Do you think its reasonable to<br>
>> >> >> > conditionally add -lgcc_s depending on it exists or not?<br>
>> >> >><br>
>> >> >> Honestly though this is non-standard and not worth adding code for.<br>
>> >> >> The situation on Linux is still a regression though :/<br>
>> >> >><br>
>> >> >> Thanks a lot!<br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>