<div dir="ltr">I've used to build clang on MSYS2 with older version of this patch at <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Alexpux_MINGW-2Dpackages_blob_master_mingw-2Dw64-2Dclang_clang-2Dmingw-2Ddriver.patch&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=r3JtGknlg70px5yvRWhv1Zl7r4WNJKqtaJd9HISLW8E&s=Ix-0aW1nGYMxzuqzb9pdVofsl42YNYgvP3nfa6Vzf8E&e=" target="_blank">https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-clang/clang-mingw-driver.patch</a> and it served me well. this new patch not so much.Below the relevant dumps ;<br><div style="margin-left:40px"><br>$ g++ -E -x c++ - -v < /dev/null<br>Using built-in specs.<br>COLLECT_GCC=C:\msys2_64\mingw64\bin\g++.exe<br>Target: x86_64-w64-mingw32<br>Configured with: ../gcc-4.9.2/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/4.9.2 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-cloog-backend=isl --enable-version-specific-runtime-libs --disable-cloog-version-check --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-cloog=/mingw64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__sourceforge.net_projects_msys2&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=r3JtGknlg70px5yvRWhv1Zl7r4WNJKqtaJd9HISLW8E&s=qxch1gn6dUS6rczZ8OX27JDQX2SAixXM5TJTJug9FhI&e=" target="_blank">http://sourceforge.net/projects/msys2</a> --with-gnu-as --with-gnu-ld<br>Thread model: posix<br>gcc version 4.9.2 (Rev5, Built by MSYS2 project)<br>COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'<br> C:/msys2_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/cc1plus.exe -E -quiet -v -iprefix C:/msys2_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/ -D_REENTRANT - -mtune=generic -march=x86-64<br># 1 "<stdin>"<br># 1 "<built-in>"<br># 1 "<command-line>"<br># 1 "<stdin>"<br>ignoring duplicate directory "C:/msys2_64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.9.2/include"<br>ignoring nonexistent directory "C:/msys64/mingw64/include"<br>ignoring nonexistent directory "/mingw64/include"<br>ignoring duplicate directory "C:/msys2_64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.9.2/include-fixed"<br>ignoring duplicate directory "C:/msys2_64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/include"<br>ignoring nonexistent directory "C:/msys64/mingw64/x86_64-w64-mingw32/include"<br>#include "..." search starts here:<br>#include <...> search starts here:<br> C:/msys2_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/include<br> C:/msys2_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../include<br> C:/msys2_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/include-fixed<br> C:/msys2_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/include<br> C:/msys2_64/mingw64/lib/gcc/../../include/c++/4.9.2<br> C:/msys2_64/mingw64/lib/gcc/../../include/c++/4.9.2/x86_64-w64-mingw32<br> C:/msys2_64/mingw64/lib/gcc/../../include/c++/4.9.2/backward<br><br></div><br>Built with the older MSYS2 patch ;<br><div style="margin-left:40px">$ clang++ -E -x c++ - -v < /dev/null<br>clang version 3.7.0 (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_git_clang.git&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=r3JtGknlg70px5yvRWhv1Zl7r4WNJKqtaJd9HISLW8E&s=pPjfizf2zAebxGKdA0tfJNJMfhG4rOM7lwPnfPMa14Q&e=" target="_blank">http://llvm.org/git/clang.git</a> e7cee814a12b5dd16c8672543fd93efe741d5208) (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_git_llvm.git&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=r3JtGknlg70px5yvRWhv1Zl7r4WNJKqtaJd9HISLW8E&s=nrLEvIb_FdlnMl1MALmnNd72UDSWQ11U46obfWTKRRA&e=" target="_blank">http://llvm.org/git/llvm.git</a> d594ba081506f0f57e9801e3f81467b1766b1e04)<br>Target: x86_64-pc-windows-gnu<br>Thread model: posix<br> "C:\\msys2_64\\mingw64\\bin\\clang++.exe" -cc1 -triple x86_64-pc-windows-gnu -E -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -dwarf-column-info -fno-unique-section-names -resource-dir "C:\\msys2_64\\mingw64\\bin\\..\\lib\\clang\\3.7.0" -internal-isystem "C:\\msys2_64\\mingw64\\bin/../include/c++/4.9.2" -internal-isystem "C:\\msys2_64\\mingw64\\bin/../include/c++/4.9.2/x86_64-w64-mingw32" -internal-isystem "C:\\msys2_64\\mingw64\\bin/../include/c++/4.9.2/backward" -internal-isystem "C:\\msys2_64\\mingw64\\bin/../x86_64-w64-mingw32/include/c++" -internal-isystem "C:\\msys2_64\\mingw64\\bin/../x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32" -internal-isystem "C:\\msys2_64\\mingw64\\bin/../x86_64-w64-mingw32/include/c++/backward" -internal-isystem "C:\\msys2_64\\mingw64\\bin\\..\\lib\\clang\\3.7.0\\include" -internal-isystem "C:\\msys2_64\\mingw64\\bin/../x86_64-w64-mingw32/include" -internal-isystem "C:\\msys2_64\\mingw64\\bin/../include" -fdeprecated-macro -fdebug-compilation-dir "E:\\llvm\\buildmingw64\\bin" -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o - -x c++ -<br>clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target x86_64-pc-windows-gnu<br>ignoring nonexistent directory "C:\msys2_64\mingw64\bin/../x86_64-w64-mingw32/include/c++"<br>ignoring nonexistent directory "C:\msys2_64\mingw64\bin/../x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32"<br>ignoring nonexistent directory "C:\msys2_64\mingw64\bin/../x86_64-w64-mingw32/include/c++/backward"<br>ignoring duplicate directory "C:\msys2_64\mingw64\bin\..\lib\clang\3.7.0\include"<br>#include "..." search starts here:<br>#include <...> search starts here:<br> C:\msys2_64\mingw64\bin/../include/c++/4.9.2<br> C:\msys2_64\mingw64\bin/../include/c++/4.9.2/x86_64-w64-mingw32<br> C:\msys2_64\mingw64\bin/../include/c++/4.9.2/backward<br> C:\msys2_64\mingw64\bin\..\lib\clang\3.7.0\include<br> C:\msys2_64\mingw64\bin/../x86_64-w64-mingw32/include<br> C:\msys2_64\mingw64\bin/../include<br>End of search list.<br></div>New Patch<br><div style="margin-left:40px">$ ./clang++ -E -x c++ - -v < /dev/null<br>clang version 3.7.0 (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_git_clang.git&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=r3JtGknlg70px5yvRWhv1Zl7r4WNJKqtaJd9HISLW8E&s=pPjfizf2zAebxGKdA0tfJNJMfhG4rOM7lwPnfPMa14Q&e=" target="_blank">http://llvm.org/git/clang.git</a> 0af047c817acbc67e61aa82f0b43a54d61b753f8) (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_git_llvm.git&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=r3JtGknlg70px5yvRWhv1Zl7r4WNJKqtaJd9HISLW8E&s=nrLEvIb_FdlnMl1MALmnNd72UDSWQ11U46obfWTKRRA&e=" target="_blank">http://llvm.org/git/llvm.git</a> 9a9ee6f550c0789053c260203aea8430a34554fe)<br>Target: x86_64-pc-windows-gnu<br>Thread model: posix<br> "E:\\llvm\\buildmingw64\\bin\\clang++.exe" -cc1 -triple x86_64-pc-windows-gnu -E -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -dwarf-column-info -resource-dir "E:\\llvm\\buildmingw64\\bin\\..\\lib\\clang\\3.7.0" -internal-isystem "C:\\msys2_64\\mingw64\\x86_64-w64-mingw32\\include\\c++" -internal-isystem "C:\\msys2_64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\x86_64-w64-mingw32\\" -internal-isystem "C:\\msys2_64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\backward" -internal-isystem "C:\\msys2_64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\4.9.2\\include\\c++" -internal-isystem "C:\\msys2_64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\4.9.2\\include\\c++\\x86_64-w64-mingw32\\" -internal-isystem "C:\\msys2_64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\4.9.2\\include\\c++\\backward" -internal-isystem "E:\\llvm\\buildmingw64\\bin\\..\\lib\\clang\\3.7.0\\include" -internal-isystem "C:\\msys2_64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\4.9.2\\include" -internal-isystem "C:\\msys2_64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\4.9.2\\include-fixed" -internal-isystem "C:\\msys2_64\\mingw64\\x86_64-w64-mingw32\\include" -internal-isystem "C:\\msys2_64\\mingw64\\include" -fdeprecated-macro -fdebug-compilation-dir "E:\\llvm\\buildmingw64\\bin" -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o - -x c++ -<br>clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target x86_64-pc-windows-gnu<br>ignoring nonexistent directory "C:\msys2_64\mingw64\x86_64-w64-mingw32\include\c++"<br>ignoring nonexistent directory "C:\msys2_64\mingw64\x86_64-w64-mingw32\include\c++\x86_64-w64-mingw32\"<br>ignoring nonexistent directory "C:\msys2_64\mingw64\x86_64-w64-mingw32\include\c++\backward"<br>ignoring nonexistent directory "C:\msys2_64\mingw64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++"<br>ignoring nonexistent directory "C:\msys2_64\mingw64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\x86_64-w64-mingw32\"<br>ignoring nonexistent directory "C:\msys2_64\mingw64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\backward"<br>#include "..." search starts here:<br>#include <...> search starts here:<br> E:\llvm\buildmingw64\bin\..\lib\clang\3.7.0\include<br> C:\msys2_64\mingw64\lib\gcc\x86_64-w64-mingw32\4.9.2\include<br> C:\msys2_64\mingw64\lib\gcc\x86_64-w64-mingw32\4.9.2\include-fixed<br> C:\msys2_64\mingw64\x86_64-w64-mingw32\include<br> C:\msys2_64\mingw64\include<br>End of search list.<br><br></div>I assume this patch only meant to fix the official mingw-builds?<br><div><div style="margin-left:40px"><br></div><div><div><div><div><div style="margin-left:40px">
<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div></div></div></div></div></div>