RE: GCC ABI versions

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

 



-----Original Message-----
From: Jonathan Wakely <jwakely.gcc@xxxxxxxxx> 
Sent: Wednesday, August 29, 2018 2:08 PM
To: Igor Chudov <Igor_Chudov@xxxxxxxx>
Cc: gcc-help <gcc-help@xxxxxxxxxxx>
Subject: Re: GCC ABI versions

> On Wed, 29 Aug 2018 at 11:06, Igor Chudov <Igor_Chudov@xxxxxxxx> wrote:
> >
> > Hello colleagues!
> >
> > I'm trying to build solib written in C++ on CentOS with different ABI versions and with different compilers (GCC 4.4, GCC 4.8, GCC 5.2, GCC 6.3 and GCC 7.3). On more recent compiler versions (GCC 5.2 and higher) we're using flag -D_GLIBCXX_USE_CXX11_ABI=0 and -D_GLIBCXX_USE_CXX11_ABI=1 .
> >
> > AFAIK there is a flag -fabi-version which allows to switch between ABI versions too but as far as I understood the documentation, it switches not C++98/C++11 ABI but another kind of things.
> 
> It's completely unrelated.
> 
> > I'm striving to eliminate the need to build the solib using different versions of compilers and to correctly specify the needed version of ABI.
> >
> > Could someone possibly help me with determining the ABI versions used by the specified versions of GCC so I will be able to remove the unneeded compilers?
> 
> https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
> should be clear.

Okay. I understood that the flag switches between different implementations of symbols with names in std::__cxx11 namespace.

Could you possibly explain the purpose of -fabi-version option? Honestly, I read the documentation at https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html but still have questions left.  Does it has any meaning to lock C++ ABI version on older versions of ABI using -fabi-version=3 (for example) and use -D_GLIBCXX_USE_CXX11_ABI=0 so the users of the solib will be able to use it (link against it) both under old and recent versions of GCC with both -std c++98 and c++11 ? Does it possible to link application with different libraries which use different -D_GLIBCXX_USE_CXX11_ABI ?

Also is it possible to somehow link solib after -D_GLIBCXX_USE_CXX11_ABI=0 with application being built using -D_GLIBCXX_USE_CXX11_ABI=1?

P. S.: I understand that questions may be totally incorrect but currently I have a mess in my head regarding full understanding of how GCC operates with DSO ABI.

---
With best regards,
Igor Chudov




[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