<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 15, 2016 at 1:30 PM, Maria Gottschalk 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><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div dir="ltr"><span>I did a little experiment. I've built 3.9.0rc1 with gcc-4.9.2 and then let this 3.9.0rc1 rebuild itself (using again headers and  libstdc++ from gcc-4.9.2).</span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>$ nm -C libLLVMCore.a  | grep cxx11</span></div><div dir="ltr"><span>0000000000000000 W std::_Rb_tree<std::string, std::pair<std::string const, std::string>, std::_Select1st<std::pair<std:<wbr>:string const, std::string> >, std::less<std::string>, std::allocator<std::pair<std::<wbr>string const, std::string> > >::erase[abi:cxx11](std::_Rb_<wbr>tree_iterator<std::pair<std::<wbr>string const, std::string> >)</span></div><div dir="ltr"><span>0000000000000000 W std::_Rb_tree<std::string, std::pair<std::string const, std::string>, std::_Select1st<std::pair<std:<wbr>:string const, std::string> >, std::less<std::string>, std::allocator<std::pair<std::<wbr>string const, std::string> > >::erase[abi:cxx11](std::_Rb_<wbr>tree_const_iterator<std::pair<<wbr>std::string const, std::string> >)<br></span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>That's two times  </span><span>[abi:cxx11]. But libstdc++ from gcc-4.9.2 doesn't use abi tags, does it?</span></div></div></div></blockquote><div><br></div><div>*shrug* If an ABI tag appears in a mangling, then the code fed to Clang contained an __attribute__((abi_tag)). There's no other way for it to get there. You could try preprocessing the relevant source file (with -E) and see if the abi_tag attribute appears somewhere in the output if you're curious how it's getting into your build.</div><div><br></div><div>(How sure are you that Clang is using libstdc++ 4.9.2 and not a later version?)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div dir="ltr"><span></span></div><div dir="ltr"><span>(The build completes anyway and all tests succeed!)</span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>M.<br></span></div><div dir="ltr"><br><span></span></div> <div><br><br></div><div style="display:block"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><span class=""> <div dir="ltr"><font face="Arial" size="2"> Andrey Bokhanko <<a href="mailto:andreybokhanko@gmail.com" target="_blank">andreybokhanko@gmail.com</a>> schrieb am 20:53 Montag, 15.August 2016:<br></font></div>  <br><br> </span><div><div><div><span class="">To clarify, this is obviously a compiler flag, but the macro is consumed by the library (not compiler) and doesn't affect how gcc/clang work. Thus, if you want old mangling, just pass this flag either to gcc or clang.<div><br clear="none"></div><div>Yours,</div></span><div><span class="">Andrey<br clear="none"><br clear="none">On Monday, August 15, 2016, Andrey Bokhanko <<a rel="nofollow" shape="rect" href="mailto:andreybokhanko@gmail.com" target="_blank">andreybokhanko@gmail.com</a>> wrote:<br clear="none"></span><div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As I understand, -D_GLIBCXX_USE_CXX11_ABI is a library flag, not compiler one, so clang should work with libstdc++ *exactly* as gcc5+ do. See <a rel="nofollow" shape="rect" href="http://developers.redhat.com/blog/2015/02/05/gcc5-and-the-c11-abi/" target="_blank">http://developers.redhat.com/ blog/2015/02/05/gcc5-and-the- c11-abi/</a> for details.<span class=""><div><br clear="none"></div><div>Yours,</div><div>Andrey</div><div><br clear="none">On Monday, August 15, 2016, Renato Golin <<a rel="nofollow" shape="rect">renato.golin@linaro.org</a>> wrote:<br clear="none"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 15 August 2016 at 15:58, Maria Gottschalk via cfe-dev<br clear="none">
<<a rel="nofollow" shape="rect">cfe-dev@lists.llvm.org</a>> wrote:<br clear="none">
> So, is it correct that clang-3.9.0 unconditionally compiles for the new abi? That gcc 4.x.y is no longer usable and that you must have gcc 5+ if you want to use libstdc++?<br clear="none">
<br clear="none">
Oh bother! Adding Dmitry, as he wrote the code [1].<br clear="none">
<br clear="none">
I was under the impression that, if you didn't use the tag, nothing<br clear="none">
would have changed.<br clear="none">
<br clear="none">
We don't have many compile-time options like GCC, so this would have<br clear="none">
to be a run-time option, if needed.<br clear="none">
<br clear="none">
cheers,<br clear="none">
--renato<br clear="none">
<br clear="none">
[1] <a rel="nofollow" shape="rect" href="https://reviews.llvm.org/D18035" target="_blank">https://reviews.llvm.org/D1803 5</a> and <a rel="nofollow" shape="rect" href="https://reviews.llvm.org/D17567" target="_blank">https://reviews.llvm.org/D1756 7</a><br clear="none">
</blockquote></div>
</span></blockquote></div></div></div></div><br><br></div>  </div> </div>  </div></div></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></div>