<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body smarttemplateinserted="true" bgcolor="#FFFFFF" text="#000000">
<div id="smartTemplate4-template">
<p> Yes, logs come from unmodified build of in-tree build of
libc++.</p>
<p>Here is NODEFAULTLIBS check<br>
</p>
<blockquote>
<p>Performing C++ SOURCE FILE Test
LIBCXXABI_HAS_NODEFAULTLIBS_FLAG succeeded with the following
output:<br>
Change Dir:
D:/projekty/msys2/MINGW-packages/mingw-w64-clang/src/build-i686/CMakeFiles/CMakeTmp<br>
<br>
Run Build Command:"D:/msys64/usr/bin/make.exe"
"cmTC_a0b32/fast"<br>
/usr/bin/make -f CMakeFiles/cmTC_a0b32.dir/build.make
CMakeFiles/cmTC_a0b32.dir/build<br>
[1;34mmake[1]:[0m Entering directory
'/d/projekty/msys2/MINGW-packages/mingw-w64-clang/src/build-i686/CMakeFiles/CMakeTmp'<br>
Building CXX object CMakeFiles/cmTC_a0b32.dir/src.cxx.obj<br>
/D/msys64/mingw32/bin/g++.exe -D_GNU_SOURCE -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor
-Wno-comment -Werror=date-time -std=gnu++11
-DLIBCXXABI_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs -o
CMakeFiles/cmTC_a0b32.dir/src.cxx.obj -c
/D/projekty/msys2/MINGW-packages/mingw-w64-clang/src/build-i686/CMakeFiles/CMakeTmp/src.cxx<br>
Linking CXX executable cmTC_a0b32.exe<br>
/D/msys64/mingw32/bin/cmake.exe -E remove -f
CMakeFiles/cmTC_a0b32.dir/objects.a<br>
/D/msys64/mingw32/bin/ar.exe cr
CMakeFiles/cmTC_a0b32.dir/objects.a
"CMakeFiles/cmTC_a0b32.dir/src.cxx.obj" <br>
/D/msys64/mingw32/bin/g++.exe -D_GNU_SOURCE -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor
-Wno-comment -Werror=date-time -std=gnu++11
-DLIBCXXABI_HAS_NODEFAULTLIBS_FLAG -pipe
-Wl,--stack,16777216 -Wl,--whole-archive
CMakeFiles/cmTC_a0b32.dir/objects.a -Wl,--no-whole-archive -o
cmTC_a0b32.exe
-Wl,--major-image-version,0,--minor-image-version,0 -lkernel32
-luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32
-luuid -lcomdlg32 -ladvapi32 <br>
[1;34mmake[1]:[0m Leaving directory
'/d/projekty/msys2/MINGW-packages/mingw-w64-clang/src/build-i686/CMakeFiles/CMakeTmp'<br>
<br>
Source file was:<br>
int main() { return 0; }</p>
<p><br>
</p>
</blockquote>
</div>
I'll try out of tree build soon.<br>
<br>
<br>
<div id="smartTemplate4-quoteHeader">------ Original Message ------<br>
Subject: Re: [cfe-dev] [libc++] Compiling with MinGW-w64<br>
Date: Thu, 23 Mar 2017 02:34:09 -0600<br>
To: Mateusz Mikuła<br>
From: Eric Fiselier</div>
<blockquote
cite="mid:CAB=TDAXUNCqW3jFseh5KjA+fdwZXKto-Mcp3jgEW=ziFMRM4VQ@mail.gmail.com"
type="cite">
<div dir="ltr">Just to verify you're not manually adding any of
the following libraries, right?
<div><br>
</div>
<div><span style="color:rgb(0,0,0);font-family:menlo,consolas,monaco,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,254,245)">-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32</span><br>
</div>
<div><span style="color:rgb(0,0,0);font-family:menlo,consolas,monaco,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,254,245)">
</span></div>
<div><span style="color:rgb(0,0,0);font-family:menlo,consolas,monaco,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,254,245)">/Eric</span></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Mar 22, 2017 at 7:04 PM, Eric
Fiselier <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote"><span class="">On Fri, Mar 17,
2017 at 4:34 PM, Mateusz Mikuła via cfe-dev <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:cfe-dev@lists.llvm.org"
target="_blank">cfe-dev@lists.llvm.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px
0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<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<wbr>: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
moz-do-not-send="true"
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
moz-do-not-send="true"
href="https://reviews.llvm.org/P7975"
target="_blank">[2]</a> and clang <a
moz-do-not-send="true"
href="https://reviews.llvm.org/P7976"
target="_blank">[3]</a>.</p>
</div>
</blockquote>
</span>
<div>CMake seems to be adding system libraries
automagically. Specifically it adds <span style="background-color:rgb(255,254,245);color:rgb(0,0,0);font-family:menlo,consolas,monaco,monospace;font-size:12px;white-space:pre-wrap"> -lgcc_s -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32.</span></div>
<div>I'm guessing that these libraries are where the
undefined symbols are coming from, and I suspect the
correct fix is to somehow prevent CMake from adding
them.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"><span class="">
<div bgcolor="#FFFFFF">
<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 moz-do-not-send="true"
class="m_-308411374499290371gmail-m_5555656344556012329m_-6702888354140731109moz-txt-link-freetext"
href="https://github.com/llvm-mirror/libcxx/blob/master/cmake/config-ix.cmake#L27"
target="_blank">https://github.com/llvm-mirror<wbr>/libcxx/blob/master/cmake/conf<wbr>ig-ix.cmake#L27</a></p>
<p>[2] <a moz-do-not-send="true"
class="m_-308411374499290371gmail-m_5555656344556012329m_-6702888354140731109moz-txt-link-freetext"
href="https://reviews.llvm.org/P7975"
target="_blank">https://reviews.llvm.org/P7975</a><br>
</p>
<p>[3] <a moz-do-not-send="true"
class="m_-308411374499290371gmail-m_5555656344556012329m_-6702888354140731109moz-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>
</span>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:cfe-dev@lists.llvm.org"
target="_blank">cfe-dev@lists.llvm.org</a><br>
<a moz-do-not-send="true"
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>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>