<div dir="rtl"><div dir="ltr">Please seeĀ <a href="https://llvm.org/bugs/show_bug.cgi?id=23529">https://llvm.org/bugs/show_bug.cgi?id=23529</a></div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2016-05-04 15:52 GMT+03:00 Nishidha Panpaliya via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>Hi All,<br><br>I've built LLVM 3.8 on POWER with gcc 5.2.1 version for one of our application. This application is built using -std=c++14 support. <br>Using this particular combination, I'm getting one error where one of the exported symbols from our application (for a function returning std::string which is built by gcc) is different than the one when compiled by clang 3.8.<br><br>I also tried to replicate this issue by using a small test application which has a function named GetString() returning std::string. When I compile this file using gcc 5.2, I see symbol name as  "_Z9GetStringB5cxx11v" and when I compile the same file using clang++, I get symbol name as  "_Z9GetStringv".<br><br>In order to resolve this difference, I tried below things -
</p><ul type="disc"><li>gcc 5.2 with c++11 support has added this special behavior due to which symbol name contains B5cxx11. Hence, I tried building LLVM/clang with -std=c++14 support. But no luck.
</li><li>Even if I provide -std=c++14 while compiling this source file using clang++, the result remained same. 
</li><li>I tried setting -D_GLIBCXX_USE_CXX11_ABI=0 flag while compiling my application using gcc. This approach atleast gave me some success. Symbols generated for my source file after using flag were same as that of clang++ (i.e. without B5cxx11). But later my application failed at linking step for some undefined references - some of the references were of the application itself and a few from dependent libraries. I wanted to know if I would also need to build my dependent libraries using this flag.</li></ul><br>I need some guidance here as to how I can build LLVM/clang so that it also generates symbols same as that of gcc5.2. I can't use any other version of gcc as I'll need rebuild lot of other dependencies.<br><br>Kindly help me.<br><br>Thanks,<br>Nishidha<br>
<p></p></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>