(In reply to comment #26)
> (In reply to comment #25)
> > 3. The problem only started because distros have chosen GCC 5 as their
> > default compilers for the current releases, which defaults to C++11.
> 
> No gcc-5 doesn't default to C++11 and the issue here has nothing to do with 
> C++98 vs. C++11.
> 
> Please try to get the facts strait, before posting long misleading replies.

It is related to C++11; afaik one of the reasons to break the ABI was to
become C++11 standard compliant; also the new classes are tagged
"cxx11".


(In reply to comment #28)
> The incompatibility was introduced by gcc's "automatic tagging of functions
> and variables with tagged types where the tags are not already reflected in
> the mangled name". 
> 
> Now every library function with e.g a std::string return type causes linker
> errors.
> 
> To solve this issue, Clang only would have to implement the return type ABI
> tagging. All other ABI tags are irrelevant AFAIK.

"Only" sounds like it would be easy and obvious. Sadly, this is not a
trivial problem.

The change was necessary to support dual-abi in one binary; you need to
be able to distinguish different ABIs in the return type.

(In reply to comment #29)
> The relevant issue is whether libstdc++'s _GLIBCXX_USE_CXX11_ABI is enabled
> by default, see
> <https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html>.

Yes. All distributions have the choice not to enable it by default in
the first place.


(In reply to comment #30)
> (In reply to comment #28)
> > To solve this issue, Clang only would have to implement the return type ABI
> > tagging. All other ABI tags are irrelevant AFAIK.
> 
> If I read correctly, one of the emails says this is only temporary, and
> wouldn't show in the final object, since C++ doesn't distinguish return
> types, that's most useful.

No, it is not temporary.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1488254

Title:
  clang++ no longer ABI-compatible with g++

To manage notifications about this bug go to:
https://bugs.launchpad.net/llvm/+bug/1488254/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to