<div dir="ltr">I ran into this today and took a stab at fixing it:<div><a href="https://reviews.llvm.org/D31518">https://reviews.llvm.org/D31518</a><br></div><div><br></div><div>It's probably a terrible fix, but I needed most of those mingw libraries to get basic programs linking. I could rewrite the patch using more auto-conf-y style tests, but they are slow and unreliable.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 17, 2017 at 3:34 PM, Mateusz Mikuła via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div 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.<wbr>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" target="_blank">[1]</a>).
      However many following checks fail due to undefined references,
      results with gcc <a href="https://reviews.llvm.org/P7975" target="_blank">[2]</a>
      and clang <a href="https://reviews.llvm.org/P7976" target="_blank">[3]</a>.</p>
    <p>Hard-coding 0 for LIBCXX_SUPPORTS_NODEFAULTLIBS_<wbr>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="m_8192861613337471926moz-txt-link-freetext" href="https://github.com/llvm-mirror/libcxx/blob/master/cmake/config-ix.cmake#L27" target="_blank">https://github.com/llvm-<wbr>mirror/libcxx/blob/master/<wbr>cmake/config-ix.cmake#L27</a></p>
    <p>[2] <a class="m_8192861613337471926moz-txt-link-freetext" href="https://reviews.llvm.org/P7975" target="_blank">https://reviews.llvm.org/P7975</a><br>
    </p>
    <p>[3] <a class="m_8192861613337471926moz-txt-link-freetext" href="https://reviews.llvm.org/P7976" target="_blank">https://reviews.llvm.org/P7976</a></p>
    <p><br>
    </p>
    <p>Thanks,</p>
    <p>Mateusz<br>
    </p>
  </div>

<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>