On Tuesday 24 March 2015 16:35:16 Nikos Chantziaras wrote:
> ++On 23/03/15 23:43, Thiago Macieira wrote:
> > On Monday 23 March 2015 20:28:10 Nikos Chantziaras wrote:
> >> There's ABI differences between libstdc++ versions when using C++11, so
> >> one has to wonder what happens when using C++11 in Qt (which was built
> >> with the RH dev toolset) and then the resulting application is used on
> >> vanilla RHEL without the toolset...
> > 
> > On Linux, that's not a relevant question. We don't expose any of the
> > libstdc++ ABI in our ABI. All you need is the base C++ core language
> > support to be working (operator new, typeinfos, etc.).
> 
> But even if you don't expose it, don't you still *use* it? Doesn't Qt
> have a dependency on libstdc++ since it uses it internally (by virtue of
> consisting of C++ code and being linked by g++)?

We use it. See also the now-going discussion in the dev mailing list abou 
enabling C++14 too.

And we link to libstdc++ by the simple fact that we use "g++" to link the 
libraries and that will automatically add a hidden "-lstdc++" to the linker. 
Unlike on modern OS X, on Linux the core language support part of the C++ 
standard library (libsupc++) is not separated out from libstdc++. So yes, we 
use symbols from libstdc++. The full list from QtCore is below.

> If Qt is built with -std=g++11 (or -std=c++11), then Qt itself depends
> on the C++11 ABI of libstdc++ it was built against, I think. That's why

That's incorrect.

> I'm asking what happens if you then run the Qt *.so libs on an older
> libstdc++.

That question can be answered if you take this discussion outside of the C++11 
context: what happens if you link Qt to a given library A and then try to run 
with an older version of it?


Full list of symbols from libstdc++ used by QtCore, when compiled:
                 U operator delete[](void*)
                 U operator delete(void*)
                 U operator delete(void*, std::nothrow_t const&)
                 U operator new[](unsigned long)
                 U std::exception::what() const
                 U std::bad_alloc::~bad_alloc()
                 U std::exception::~exception()
                 U operator new(unsigned long)
                 U operator new(unsigned long, std::nothrow_t const&)
                 U std::nothrow
                 U std::terminate()
                 U typeinfo for std::bad_alloc
                 U typeinfo for std::exception
                 U vtable for __cxxabiv1::__class_type_info
                 U vtable for __cxxabiv1::__si_class_type_info
                 U vtable for __cxxabiv1::__vmi_class_type_info
                 U vtable for std::bad_alloc
                 U vtable for std::exception

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to