<div dir="rtl"><div dir="ltr">Ok, please try the attached patch that looks for <span style="font-size:12.8000001907349px">$TARGET-gcc before looking for gcc.</span></div><div dir="ltr"><span style="font-size:12.8000001907349px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-07-12 9:38 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">Thats /usr/bin/gcc which is not the mingw one, if gcc in PATH being<br>
important then I suggest looking for $TARGET-gcc first which will work<br>
for mingw-w64 case too.<br>
<div class="HOEnZb"><div class="h5"><br>
On Sun, Jul 12, 2015 at 8:09 AM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>> wrote:<br>
> What is the output from<br>
><br>
>> which gcc<br>
><br>
><br>
><br>
> 2015-07-11 13:59 GMT+03:00 İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>>:<br>
>><br>
>> Hi,<br>
>><br>
>> Not really answering your questions but I think the problem is clang<br>
>> is invoking $TARGET-ld directly, it used to let gcc link so gcc would<br>
>> figure out the linker details. See a run with clang 3.6.1 on same<br>
>> setup:<br>
>><br>
>> λ /usr/bin/clang -v -target x86_64-w64-mingw32 -isystem<br>
>> /usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include<br>
>> randomworks/windows/nic.c -liphlpapi<br>
>> clang version 3.6.1 (tags/RELEASE_361/final 238133)<br>
>> Target: x86_64-w64-windows-gnu<br>
>> Thread model: posix<br>
>>  "/usr/bin/clang-3.6" -cc1 -triple x86_64-w64-windows-gnu -emit-obj<br>
>> -mrelax-all -disable-free -disable-llvm-verifier -main-file-name nic.c<br>
>> -mrelocation-model static -mthread-model posix -mdisable-fp-elim<br>
>> -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables<br>
>> -target-cpu x86-64 -v -dwarf-column-info -resource-dir<br>
>> /usr/bin/../lib64/clang/3.6.1 -isystem<br>
>> /usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include<br>
>> -fdebug-compilation-dir /home/ismail -ferror-limit 19 -fmessage-length<br>
>> 126 -mstackrealign -fno-use-cxa-atexit -fobjc-runtime=gcc<br>
>> -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/nic-e31eb1.o -x<br>
>> c randomworks/windows/nic.c<br>
>> clang -cc1 version 3.6.1 based upon LLVM 3.6.1 default target<br>
>> x86_64-suse-linux<br>
>> ignoring nonexistent directory<br>
>> "/usr/bin/../lib64/clang/3.6.1/../../../i686-w64-mingw32/include"<br>
>> ignoring nonexistent directory<br>
>> "/usr/bin/../lib64/clang/3.6.1/../../../x86_64-w64-mingw32/include"<br>
>> ignoring nonexistent directory "/mingw/include"<br>
>> ignoring duplicate directory<br>
>> "/usr/bin/../lib64/clang/3.6.1/../../../include"<br>
>> #include "..." search starts here:<br>
>> #include <...> search starts here:<br>
>>  /usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include<br>
>>  /usr/local/include<br>
>>  /usr/bin/../lib64/clang/3.6.1/include<br>
>>  /usr/bin/../lib64/clang/3.6.1/../../../include<br>
>> End of search list.<br>
>>  "/usr/bin/x86_64-w64-mingw32-gcc" -v -isystem<br>
>> /usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include -m64 -o<br>
>> a.exe /tmp/nic-e31eb1.o -liphlpapi<br>
>> Using built-in specs.<br>
>> COLLECT_GCC=/usr/bin/x86_64-w64-mingw32-gcc<br>
>> COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper<br>
>> Target: x86_64-w64-mingw32<br>
>> Configured with: ../configure --prefix=/usr --bindir=/usr/bin<br>
>> --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib64<br>
>> --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share<br>
>> --build=x86_64-suse-linux-gnu --host=x86_64-suse-linux-gnu<br>
>> --target=x86_64-w64-mingw32 --with-gnu-as --with-gnu-ld --verbose<br>
>> --without-newlib --disable-multilib --disable-plugin<br>
>> --with-system-zlib --disable-nls --without-included-gettext<br>
>> --disable-win32-registry --enable-version-specific-runtime-libs<br>
>> --with-sysroot=/usr/x86_64-w64-mingw32/sys-root<br>
>> --enable-languages=c,c++,fortran,objc,obj-c++ --without-x<br>
>> --enable-hash-synchronization --enable-fully-dynamic-string<br>
>> --enable-libgomp --enable-linker-build-id<br>
>> Thread model: win32<br>
>> gcc version 5.1.0 (GCC)<br>
>><br>
>> COMPILER_PATH=/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/:/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/:/usr/lib64/gcc/x86_64-w64-mingw32/:/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/:/usr/lib64/gcc/x86_64-w64-mingw32/:/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/<br>
>><br>
>> LIBRARY_PATH=/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/:/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib/../lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/:/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/<br>
>> COLLECT_GCC_OPTIONS='-v' '-isystem'<br>
>> '/usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include' '-m64'<br>
>> '-o' 'a.exe' '-mtune=generic' '-march=x86-64'<br>
>>  /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/collect2 -plugin<br>
>> /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/liblto_plugin.so<br>
>> -plugin-opt=/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper<br>
>> -plugin-opt=-fresolution=/tmp/ccd7Jm2a.res<br>
>> -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc<br>
>> -plugin-opt=-pass-through=-lgcc_eh<br>
>> -plugin-opt=-pass-through=-lmoldname<br>
>> -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt<br>
>> -plugin-opt=-pass-through=-ladvapi32<br>
>> -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32<br>
>> -plugin-opt=-pass-through=-lkernel32<br>
>> -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc<br>
>> -plugin-opt=-pass-through=-lgcc_eh<br>
>> -plugin-opt=-pass-through=-lmoldname<br>
>> -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt<br>
>> --sysroot=/usr/x86_64-w64-mingw32/sys-root --build-id -m i386pep<br>
>> -Bdynamic -o a.exe<br>
>> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o<br>
>> /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/crtbegin.o<br>
>> -L/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0<br>
>><br>
>> -L/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib/../lib<br>
>> -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib<br>
>><br>
>> -L/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib<br>
>> -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib /tmp/nic-e31eb1.o<br>
>> -liphlpapi -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt<br>
>> -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh<br>
>> -lmoldname -lmingwex -lmsvcrt<br>
>> /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/crtend.o<br>
>><br>
>><br>
>> On Fri, Jul 10, 2015 at 9:55 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>><br>
>> wrote:<br>
>> > OK, please help me understand,<br>
>> ><br>
>> > Where are the include directories?<br>
>> > Where are the lib directories?<br>
>> > Is gcc on the path? where?<br>
>> > Should clang have a default hardcoed sysroot location on Linux which is<br>
>> > not<br>
>> > based on clang installed location?<br>
>> ><br>
>> ><br>
>> > 2015-07-10 21:45 GMT+03:00 İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>>:<br>
>> >><br>
>> >> The problem is this exact command line worked since forever and only<br>
>> >> recently regressed thats why I report it.<br>
>> >><br>
>> >> On Fri, Jul 10, 2015 at 9:38 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > clang can locate  /usr/x86_64-w64-mingw32/sys-root if provided to the<br>
>> >> > -sysroot option or deduce sysroot automatically if it finds<br>
>> >> > /usr/x86_64-w64-mingw32/sys-root/bin/gcc binary on the path.<br>
>> >> ><br>
>> >> > clang does not deduce the sysroot from the -isystem directory by<br>
>> >> > itself.<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > 2015-07-10 19:57 GMT+03:00 İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>>:<br>
>> >> >><br>
>> >> >> Anyhow this is not a nice example since it uses Cygwin's ld. A<br>
>> >> >> better<br>
>> >> >> example from Linux side:<br>
>> >> >><br>
>> >> >> λ clang -v -target x86_64-w64-mingw32 -isystem<br>
>> >> >> /usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include<br>
>> >> >> randomworks/windows/nic.c<br>
>> >> >> clang version 3.7.0 (trunk 241471)<br>
>> >> >> Target: x86_64-w64-windows-gnu<br>
>> >> >> Thread model: posix<br>
>> >> >>  "/opt/clang/bin/clang-3.7" -cc1 -triple x86_64-w64-windows-gnu<br>
>> >> >> -emit-obj -mrelax-all -disable-free -main-file-name nic.c<br>
>> >> >> -mrelocation-model pic -pic-level 2 -mthread-model posix<br>
>> >> >> -fmath-errno<br>
>> >> >> -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu<br>
>> >> >> x86-64<br>
>> >> >> -momit-leaf-frame-pointer -v -dwarf-column-info -resource-dir<br>
>> >> >> /opt/clang/bin/../lib64/clang/3.7.0 -isystem<br>
>> >> >> /usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include<br>
>> >> >> -internal-isystem /opt/clang/bin/../lib64/clang/3.7.0/include<br>
>> >> >> -internal-isystem include -internal-isystem include-fixed<br>
>> >> >> -internal-isystem /usr/mingw32/include -internal-isystem<br>
>> >> >> /usr/include<br>
>> >> >> -fdebug-compilation-dir /home/ismail -ferror-limit 19<br>
>> >> >> -fmessage-length<br>
>> >> >> 126 -mstackrealign -fno-use-cxa-atexit -fobjc-runtime=gcc<br>
>> >> >> -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/nic-08e945.o<br>
>> >> >> -x<br>
>> >> >> c randomworks/windows/nic.c<br>
>> >> >> clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target<br>
>> >> >> x86_64-suse-linux<br>
>> >> >> ignoring nonexistent directory "include"<br>
>> >> >> ignoring nonexistent directory "include-fixed"<br>
>> >> >> ignoring nonexistent directory "/usr/mingw32/include"<br>
>> >> >> #include "..." search starts here:<br>
>> >> >> #include <...> search starts here:<br>
>> >> >>  /usr/x86_64-w64-mingw32/sys-root/x86_64-w64-mingw32/include<br>
>> >> >>  /opt/clang/bin/../lib64/clang/3.7.0/include<br>
>> >> >>  /usr/include<br>
>> >> >> End of search list.<br>
>> >> >>  "/usr/bin/x86_64-w64-mingw32-ld" -m i386pep -Bdynamic -o a.exe<br>
>> >> >> crt2.o<br>
>> >> >> crtbegin.o -L -L/usr/lib -L/usr/mingw32/lib /tmp/nic-08e945.o<br>
>> >> >> -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32<br>
>> >> >> -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname<br>
>> >> >> -lmingwex -lmsvcrt crtend.o<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find crt2.o: No such file or<br>
>> >> >> directory<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find crtbegin.o: No such file<br>
>> >> >> or directory<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmingw32<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lgcc_s<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lgcc<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmoldname<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmingwex<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmsvcrt<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -ladvapi32<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lshell32<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -luser32<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lkernel32<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmingw32<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lgcc_s<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lgcc<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmoldname<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmingwex<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmsvcrt<br>
>> >> >> /usr/bin/x86_64-w64-mingw32-ld: cannot find crtend.o: No such file<br>
>> >> >> or<br>
>> >> >> directory<br>
>> >> >> clang-3.7: error: linker command failed with exit code 1 (use -v to<br>
>> >> >> see invocation)<br>
>> >> >><br>
>> >> >><br>
>> >> >> On Fri, Jul 10, 2015 at 7:54 PM, İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>><br>
>> >> >> wrote:<br>
>> >> >> > This is without any patches (r241901-win64) and the original<br>
>> >> >> > command<br>
>> >> >> > line is there:<br>
>> >> >> ><br>
>> >> >> > clang -v -target x86_64-w64-mingw32 -isystem<br>
>> >> >> >  C:/mingw-w64-6.0.0/x86_64-w64-mingw32/include -isystem<br>
>> >> >> >  C:/mingw-w64-6.0.0/include/c++/6.0.0 -isystem<br>
>> >> >> >  C:/mingw-w64-6.0.0/include/c++/6.0.0/x86_64-w64-mingw32<br>
>> >> >> >  randomworks/windows/nic.c<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > On Fri, Jul 10, 2015 at 7:51 PM, Yaron Keren<br>
>> >> >> > <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>><br>
>> >> >> > wrote:<br>
>> >> >> >> This is with or without any patches? what is the original command<br>
>> >> >> >> line?<br>
>> >> >> >><br>
>> >> >> >><br>
>> >> >> >> 2015-07-10 19:30 GMT+03:00 İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>>:<br>
>> >> >> >>><br>
>> >> >> >>> Hi,<br>
>> >> >> >>><br>
>> >> >> >>> I meant to try these but both on cygwin and linux hosts we have<br>
>> >> >> >>> linking regression that goes like:<br>
>> >> >> >>><br>
>> >> >> >>> λ clang -v -target x86_64-w64-mingw32 -isystem<br>
>> >> >> >>> C:/mingw-w64-6.0.0/x86_64-w64-mingw32/include -isystem<br>
>> >> >> >>> C:/mingw-w64-6.0.0/include/c++/6.0.0 -isystem<br>
>> >> >> >>> C:/mingw-w64-6.0.0/include/c++/6.0.0/x86_64-w64-mingw32<br>
>> >> >> >>> randomworks/windows/nic.c<br>
>> >> >> >>> clang version 3.7.0 (<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_llvm-2Dmirror_clang.git&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=yeNWkil9qt1TIMAxl4vWaCIa1oT_I8pI38mjKxMh-z4&s=KDOd5-eIKufOHEajO5DeJaW3qByMezIjqktLAQT9mRY&e=" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/clang.git</a><br>
>> >> >> >>> ca355c9f413a6ca4941e3033e89e5242e29bd802)<br>
>> >> >> >>> Target: x86_64-w64-windows-gnu<br>
>> >> >> >>> Thread model: posix<br>
>> >> >> >>>  "C:\\Program Files\\LLVM\\bin\\clang.exe" -cc1 -triple<br>
>> >> >> >>> x86_64-w64-windows-gnu -emit-obj -mrelax-all -disable-free<br>
>> >> >> >>> -main-file-name nic.c -mrelocation-model pic -pic-level 2<br>
>> >> >> >>> -mthread-model posix -fmath-errno -masm-verbose<br>
>> >> >> >>> -mconstructor-aliases<br>
>> >> >> >>> -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v<br>
>> >> >> >>> -dwarf-column-info -resource-dir "C:\\Program<br>
>> >> >> >>> Files\\LLVM\\bin\\..\\lib\\clang\\3.7.0" -isystem<br>
>> >> >> >>> C:/mingw-w64-6.0.0/x86_64-w64-mingw32/include -isystem<br>
>> >> >> >>> C:/mingw-w64-6.0.0/include/c++/6.0.0 -isystem<br>
>> >> >> >>> C:/mingw-w64-6.0.0/include/c++/6.0.0/x86_64-w64-mingw32<br>
>> >> >> >>> -internal-isystem "C:\\Program<br>
>> >> >> >>> Files\\LLVM\\bin\\..\\lib\\clang\\3.7.0\\include"<br>
>> >> >> >>> -internal-isystem<br>
>> >> >> >>> include -internal-isystem include-fixed -internal-isystem<br>
>> >> >> >>> "C:\\cygwin64\\mingw32\\include" -internal-isystem<br>
>> >> >> >>> "C:\\cygwin64\\include" -std=c11 -fdebug-compilation-dir<br>
>> >> >> >>> "C:\\cygwin64\\home\\ismail" -ferror-limit 19 -fmessage-length 0<br>
>> >> >> >>> -mstackrealign -fno-use-cxa-atexit -fobjc-runtime=gcc<br>
>> >> >> >>> -fdiagnostics-show-option -fcolor-diagnostics<br>
>> >> >> >>> -fansi-escape-codes<br>
>> >> >> >>> -o<br>
>> >> >> >>> "C:\\cygwin64\\tmp\\nic-6bff3b.o" -x c randomworks/windows/nic.c<br>
>> >> >> >>> clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target<br>
>> >> >> >>> x86_64-pc-windows-msvc<br>
>> >> >> >>> ignoring nonexistent directory "include"<br>
>> >> >> >>> ignoring nonexistent directory "include-fixed"<br>
>> >> >> >>> ignoring nonexistent directory "C:\cygwin64\mingw32\include"<br>
>> >> >> >>> ignoring nonexistent directory "C:\cygwin64\include"<br>
>> >> >> >>> #include "..." search starts here:<br>
>> >> >> >>> #include <...> search starts here:<br>
>> >> >> >>>  C:/mingw-w64-6.0.0/x86_64-w64-mingw32/include<br>
>> >> >> >>>  C:/mingw-w64-6.0.0/include/c++/6.0.0<br>
>> >> >> >>>  C:/mingw-w64-6.0.0/include/c++/6.0.0/x86_64-w64-mingw32<br>
>> >> >> >>>  C:\Program Files\LLVM\bin\..\lib\clang\3.7.0\include<br>
>> >> >> >>> End of search list.<br>
>> >> >> >>>  "C:\\cygwin64\\bin\\ld.exe" -m i386pep -Bdynamic -o a.exe<br>
>> >> >> >>> crt2.o<br>
>> >> >> >>> crtbegin.o -L "-LC:\\cygwin64\\lib"<br>
>> >> >> >>> "-LC:\\cygwin64\\mingw32\\lib"<br>
>> >> >> >>> "C:\\cygwin64\\tmp\\nic-6bff3b.o" -lmingw32 -lgcc_s -lgcc<br>
>> >> >> >>> -lmoldname<br>
>> >> >> >>> -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32<br>
>> >> >> >>> -lmingw32<br>
>> >> >> >>> -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt crtend.o<br>
>> >> >> >>> /usr/bin/ld: cannot find crt2.o: No such file or directory<br>
>> >> >> >>> /usr/bin/ld: cannot find crtbegin.o: No such file or directory<br>
>> >> >> >>> /usr/bin/ld: cannot find -lmingw32<br>
>> >> >> >>> /usr/bin/ld: cannot find -lgcc_s<br>
>> >> >> >>> /usr/bin/ld: cannot find -lgcc<br>
>> >> >> >>> /usr/bin/ld: cannot find -lmoldname<br>
>> >> >> >>> /usr/bin/ld: cannot find -lmingwex<br>
>> >> >> >>> /usr/bin/ld: cannot find -lmsvcrt<br>
>> >> >> >>> /usr/bin/ld: cannot find -lmingw32<br>
>> >> >> >>> /usr/bin/ld: cannot find -lgcc_s<br>
>> >> >> >>> /usr/bin/ld: cannot find -lgcc<br>
>> >> >> >>> /usr/bin/ld: cannot find -lmoldname<br>
>> >> >> >>> /usr/bin/ld: cannot find -lmingwex<br>
>> >> >> >>> /usr/bin/ld: cannot find -lmsvcrt<br>
>> >> >> >>> /usr/bin/ld: cannot find crtend.o: No such file or directory<br>
>> >> >> >>> clang.exe: error: linker command failed with exit code 1 (use -v<br>
>> >> >> >>> to<br>
>> >> >> >>> see invocation)<br>
>> >> >> >>><br>
>> >> >> >>> Any ideas? Also reproducible with gcc 5.1.1 on Linux.<br>
>> >> >> >>><br>
>> >> >> >>><br>
>> >> >> >>> On Tue, Jul 7, 2015 at 6:19 PM, Yaron Keren<br>
>> >> >> >>> <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>><br>
>> >> >> >>> wrote:<br>
>> >> >> >>> > Here is a patch honoring sysroot for ld, let me know if it<br>
>> >> >> >>> > works<br>
>> >> >> >>> > for<br>
>> >> >> >>> > you.<br>
>> >> >> >>> ><br>
>> >> >> >>> > 2015-07-07 12:13 GMT+03:00 Yaron Keren<br>
>> >> >> >>> > <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>>:<br>
>> >> >> >>> >><br>
>> >> >> >>> >> Hi,  Please see if the attached patch works on opensuse.<br>
>> >> >> >>> >><br>
>> >> >> >>> >> I'll look at the cygnus ld issue later.<br>
>> >> >> >>> >><br>
>> >> >> >>> >><br>
>> >> >> >>> >> 2015-07-07 10:38 GMT+03:00 İsmail Dönmez <<a href="mailto:ismail@donmez.ws">ismail@donmez.ws</a>>:<br>
>> >> >> >>> >>><br>
>> >> >> >>> >>> Hi,<br>
>> >> >> >>> >>><br>
>> >> >> >>> >>> On Mon, Jul 6, 2015 at 10:40 AM, Yaron Keren<br>
>> >> >> >>> >>> <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>><br>
>> >> >> >>> >>> wrote:<br>
>> >> >> >>> >>> > Author: yrnkrn<br>
>> >> >> >>> >>> > Date: Mon Jul  6 02:40:10 2015<br>
>> >> >> >>> >>> > New Revision: 241432<br>
>> >> >> >>> >>> ><br>
>> >> >> >>> >>> > URL:<br>
>> >> >> >>> >>> > <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D241432-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=yeNWkil9qt1TIMAxl4vWaCIa1oT_I8pI38mjKxMh-z4&s=-Flz_6ufKe-O10v9QHRHSWywcwRMmGsDlBdJHQTxrFg&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=241432&view=rev</a><br>
>> >> >> >>> >>> > Log:<br>
>> >> >> >>> >>> > Teach mingw toolchain the msys2 mingw-w64 distribution C++<br>
>> >> >> >>> >>> > dirs.<br>
>> >> >> >>> >>> ><br>
>> >> >> >>> >>> ><br>
>> >> >> >>> >>> > Modified:<br>
>> >> >> >>> >>> >     cfe/trunk/lib/Driver/MinGWToolChain.cpp<br>
>> >> >> >>> >>> >     cfe/trunk/lib/Driver/ToolChains.h<br>
>> >> >> >>> >>><br>
>> >> >> >>> >>> I tried this revision on openSUSE MinGW toolchain and its<br>
>> >> >> >>> >>> missing<br>
>> >> >> >>> >>> one<br>
>> >> >> >>> >>> include path, which is<br>
>> >> >> >>> >>> $GCC_ROOT/nclude/c++/x86_64-w64-mingw32<br>
>> >> >> >>> >>> which<br>
>> >> >> >>> >>> contains "bits" and "ext" directories. Would you mind adding<br>
>> >> >> >>> >>> that<br>
>> >> >> >>> >>> to<br>
>> >> >> >>> >>> the list too?<br>
>> >> >> >>> >>><br>
>> >> >> >>> >>> Thanks!<br>
>> >> >> >>> >><br>
>> >> >> >>> >><br>
>> >> >> >>> ><br>
>> >> >> >><br>
>> >> >> >><br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>