Re: ABI compatibility of libstdc++ template classes

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

 



On Thu, 29 Jul 2021, 15:14 Janosch Machowinski, <
j.machowinski@xxxxxxxxxxxxxxx> wrote:

> Hi,
>
> I'm confused about ABI compatibility for libstdc++ and hope
> that that someone on this list can enlighten me :-).
> According to
> https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
> ABI forward compatibility is guaranteed from GCC 4.2.2 up to GCC 11.
> Although, under 'Outstanding Issues' it is not recommended.
>


That's talking about mixing multiple ABIs in a single executable, e.g. from
GCC 4.1 and from GCC 11. If you only use versions from 4.2.2 onwards,
you're not doing that.

So is it now okay, or not and does it apply to template code ?
>
> But up to our concrete problem. We use Ubuntu 20.04 (GCC 9.3)
> and got a vendor driver .so build under Ubuntu 16.04 (GCC V5.4)
> (and can't get a newer build version). This library uses stl types in
> its interface classes, so it defines some Weck symbols for example for
> std::vector<SomeClass>.
> If I now build my own application against the driver I can manage
> to generate a wild mix of symbols for std::vector<SomeClass>
> coming from a way newer and the older versions.
> E.g. push_back from the GCC 5.4 build and constructor destructor
> initializer_list stuff from GCC 9.3.
> Is this mixing of template generated code allowed, or are we in
> for trouble ?
>

It's fine.


Greetings
>      Janosch
>
>
>



[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