Basic linking / compilation question

David Malcolm dmalcolm@redhat.com
Thu Jan 1 00:00:00 GMT 2015


On Mon, 2015-06-08 at 23:41 +0100, Dibyendu Majumdar wrote:
> Basic helloworld example works.

Thanks.

It occurred to me overnight that given that libgccjit.so is linked
against the C++ STL (libstdc++.so.6 on my box), there's a chance of
issues when linking against C++ code, due to the change in the ABI of
std::string in GCC 5 (for adherence to the C++11 language standard).

So if you start seeing linker errors about unresolved symbols involving
"__cxx11", you might want to build with -D_GLIBCXX_USE_CXX11_ABI=0.

See:
http://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/
and possibly this:
http://developerblog.redhat.com/2015/02/10/gcc-5-in-fedora/
(though you're on Ubuntu; I don't know if they did something similar).

That said, I don't *think* we use std::string anywhere inside gcc
itself, so this might still be a non-issue for you.

Hope this is helpful
Dave




More information about the Jit mailing list