[cfe-dev] About the GCC and C++ ABI identification tokens

René J.V. Bertin via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 22 04:40:15 PDT 2018


Hi,

I notice that Clang 5 still identifies itself as GCC 4.2.1, on Mac as on Linux. Couldn't this be upgraded by now, especially when running with -stdlib=libstdc++ where it might make sense to provide the same conditional information to code being compiled as G++ would?

An example, with wxWidgets 3.0 (built with clang 5.0) and Audacity 2.2.2 (built with GCC 7.2.0). This is on Linux, so clang will use the latest libstdc++ (lib + headers) by default:

%> audacity
11:58:22: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1002,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1010,wx containers,compatible with 2.8).
(abort)

In practice Audacity runs just fine when I patch my wxWidgets install to turn that abort into a warning message. 

FWIW, the wxWidgets build doesn't specifically request C++11 while the Audacity build does. Apologies if that explains the flagged ABI differences.

R.



More information about the cfe-dev mailing list