[cfe-dev] Does clang now emit [abi:cxx11] unconditionally when used with libstdc++?

James Y Knight via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 17 09:37:09 PDT 2016


On Wed, Aug 17, 2016 at 11:36 AM, Maria Gottschalk via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Renato Golin <renato.golin at linaro.org> schrieb am 14:16 Mittwoch,
> 17.August 2016:
> > On 16 August 2016 at 19:41, Maria Gottschalk via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> >> If major version < 5: never emit abi tags.
> >> If major version >=5: emit abi tags if requested with __attribute
> ((__abi_tag__ ("..."))).
>
> >
>
> > I don't think that's appropriate, as that would change the behaviour
> > based on the library's version, not its source code.
>
>
> That's precisely the point: every version of gcc comes with it's own copy
> of libstdc++. For compile-time linking you are supposed to use exactly this
> copy and nothing else. Now, if clang wants to use libstdc++ from gcc-4.9.2,
> it has to behave like gcc-4.9.2. And that means not emitting abi tags, even
> if they are in the code. Doing what gcc-4.9.2 does is the well tested and
> the de facto right behaviour when using libstdc++ from 4.9.2, even if you
> think it's buggy.
>
> And the fact that nobody has ever seen gcc emitting abi tags before gcc5
> translates to the simple logic outlined above
>

Except, as Richard mentioned, it's not actually a problem that needs to be
fixed. That the mangled names of the inline functions are different is
effectively irrelevant.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160817/a5212014/attachment.html>


More information about the cfe-dev mailing list