How to provide coexisting std::string's (with and without abi:cxx11) in GCC 5.1 and above?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We caught a report due to _GLIBCXX_USE_CXX11_ABI and abi:cxx11. We are
upstream, and it appears Debian built the library using GCC and
_GLIBCXX_USE_CXX11_ABI was in effect. A user then came along with
Clanf and compiled the userland program. The link failed. This is
expected given our understanding of the landscape.

We found "GCC5 and the C++11 ABI",
https://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/. The
pages says:

    Providers of such libraries or interfaces need to consider
    whether they want to provide ABI coexistence, like libstdc++
    does, or require their users to rebuild.

I read the Red Hat blog post, but its not clear to me how to
accomplish the coexistence. That is, I want to ensure the library that
Debian builds has a symbol in both namespace so linking can occur with
either GCC or Clang and "things just work" for the user.

How is libstdc++ providing symbols in both namespaces? How do I ensure
the symbol is present in both namesspaces so "things just work" for a
user?

Thanks in advance.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux