<div dir="rtl"><div dir="ltr">This is with or without any patches? what is the original command line?</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-07-10 19:30 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>
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=7RVFnXMeVP41LkrszMFeF2-ej2U1jVP-c_2peiPVC3I&s=Ew-gLXVXL_TKIaPzACUHrMnVSpMRMUb0NCkQH9TcwIo&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 -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" -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 -fansi-escape-codes -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 crt2.o<br>
crtbegin.o -L "-LC:\\cygwin64\\lib" "-LC:\\cygwin64\\mingw32\\lib"<br>
"C:\\cygwin64\\tmp\\nic-6bff3b.o" -lmingw32 -lgcc_s -lgcc -lmoldname<br>
-lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -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 to<br>
see invocation)<br>
<br>
Any ideas? Also reproducible with gcc 5.1.1 on Linux.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Tue, Jul 7, 2015 at 6:19 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>> wrote:<br>
> Here is a patch honoring sysroot for ld, let me know if it works for you.<br>
><br>
> 2015-07-07 12:13 GMT+03:00 Yaron Keren <<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 <<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: <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=7RVFnXMeVP41LkrszMFeF2-ej2U1jVP-c_2peiPVC3I&s=_Tmm2Vz019sXImWYQN4I_KUxjdQJGhomuBWGuMehpE4&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++ 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 missing one<br>
>>> include path, which is $GCC_ROOT/nclude/c++/x86_64-w64-mingw32 which<br>
>>> contains "bits" and "ext" directories. Would you mind adding that to<br>
>>> the list too?<br>
>>><br>
>>> Thanks!<br>
>><br>
>><br>
><br>
</div></div></blockquote></div><br></div>