<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body smarttemplateinserted="true" bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>I'm planing to get libc++ compiling with MinGW-w64, right now
without patches it fails with:</p>
<blockquote>
<p>CMake Error at projects/libcxx/CMakeLists.txt:396 (message):<br>
C++11 or greater is required but the compiler does not support
c++11</p>
</blockquote>
<p>It is caused by adding `-nodefaultlibs` flag (it passes it's own
check <a
href="https://github.com/llvm-mirror/libcxx/blob/master/cmake/config-ix.cmake#L27">[1]</a>).
However many following checks fail due to undefined references,
results with gcc <a href="https://reviews.llvm.org/P7975">[2]</a>
and clang <a href="https://reviews.llvm.org/P7976">[3]</a>.</p>
<p>Hard-coding 0 for LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG allows it go
finish configuration and fail during build (that's another story).
<br>
</p>
<p>`-nodefaultlibs` appears several times in libc++ and libc++abi
code and I'm not sure about cleanest way to fix/workaround it.</p>
<p>Any suggestions?<br>
</p>
<p><br>
</p>
<p>[1]
<a class="moz-txt-link-freetext" href="https://github.com/llvm-mirror/libcxx/blob/master/cmake/config-ix.cmake#L27">https://github.com/llvm-mirror/libcxx/blob/master/cmake/config-ix.cmake#L27</a></p>
<p>[2] <a class="moz-txt-link-freetext" href="https://reviews.llvm.org/P7975">https://reviews.llvm.org/P7975</a><br>
</p>
<p>[3] <a class="moz-txt-link-freetext" href="https://reviews.llvm.org/P7976">https://reviews.llvm.org/P7976</a></p>
<p><br>
</p>
<p>Thanks,</p>
<p>Mateusz<br>
</p>
</body>
</html>