This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to provide coexisting std::string's (with and without abi:cxx11) in GCC 5.1 and above?
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: Jeffrey Walton <noloader at gmail dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 24 Mar 2016 11:54:16 +0100
- Subject: Re: How to provide coexisting std::string's (with and without abi:cxx11) in GCC 5.1 and above?
- Authentication-results: sourceware.org; auth=none
- References: <CAH8yC8ne=Dy7onnzDLmq8FYHJNkmXHQGHUiQjctRBLf9fc5Ljg at mail dot gmail dot com>
On 2016.03.24 at 06:50 -0400, Jeffrey Walton wrote:
> 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?
It will not work until this clang bug gets fixed:
https://llvm.org/bugs/show_bug.cgi?id=23529
--
Markus