[cfe-dev] __GXX_ABI_VERSION

Reid Kleckner rnk at google.com
Tue Jun 30 13:53:53 PDT 2015


Clang doesn't have a notion of any C++ ABI version. We make bugfixes all
the time and mostly just pray it only affects non-extern template
instantiations. =/

We can certainly wire up -fabi-version to control the __GXX_ABI_VERSION
macro if you like, and then it will pass the compatibility test. At the end
of the day, though, the only way to ensure that any version of clang and
gcc are ABI compatible is to test it.

On Thu, Jun 18, 2015 at 11:43 PM, Nathan Ridge <zeratul976 at hotmail.com>
wrote:

> Hi,
>
> GCC defines a macro __GXX_ABI_VERSION which, as was recently explained to
> me [1],
> is governed by the flag -fabi-version [2].
>
> The latest version of GCC defines the macro (without an explicit
> -fabi-version flag) as
> 1008, which corresponds to what is described as "Version 8" on that page.
>
> Clang defines the macro as 1002, and does not seem to support the
> -fabi-version
> option (tested with clang 3.6).
>
> Does this mean that clang currently implements the "Version 2" ABI
> described on
> that page? If so, are there plans to implement the later versions?
>
> I ask because some libraries, such as wxWidgets, check this macro to
> ensure that
> a build of the library and an application using the library are
> ABI-compatible, and
> right now that mechanism deems the latest versions of gcc and clang
> incompatible.
>
> Thanks,
> Nate
>
> [1] https://gcc.gnu.org/ml/gcc-help/2015-06/msg00090.html
> [2] https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150630/5dc7bb49/attachment.html>


More information about the cfe-dev mailing list