[Mesa-dev] Statically linking libstdc++ and libgcc

Emil Velikov emil.l.velikov at gmail.com
Sun Mar 15 08:47:01 PDT 2015


On 14 March 2015 at 13:04, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 13/03/15 22:10, Francisco Jerez wrote:
>> Emil Velikov <emil.l.velikov at gmail.com> writes:
...
>>>
>>>  * Use bundled library if newer (check the SONAME).
>>>
>>> For libgcc_s at least, the library does not seems to be forward compatible.
>>>
>>
>> That belongs to your list of myths, see:
>> https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
>>
> Well spotted! As I've checked this (experimentally) some months ago, but
> I wasn't 100% sure about it - thus the "seems" rather than "is".
>
> Considering I cannot test atm (gcc 4.6 & gcc 4.7 fails to build), we'll
> say that I was delusional and add it to the myths list :P
>
Upon closer read though the document it seems that my statement above
should read "For libgcc_s at least, the library does not seem to be
_backward_ compatible.". Which is exactly what the spec says.

The SONAME has been libgcc_so.so.1 for quite some time, while new
functions are added. As such when one links against libgcc_so.so.1 and
uses __function_foo, an older library with the same SONAME, might not
provide the it.

As a reminder - this solution/workaround that is disabled by default.
It barely adds any code, plus people will have to explicitly opt-in to
use it.

-Emil


More information about the mesa-dev mailing list