John (Eljay) Love-Jensen eljay@adobe.com
Fri Feb 26 19:40:00 GMT 2010

Hi Andeas,

> -Do I have to configure gcc to use [ -D_GLIBCXX_FULLY_DYNAMIC_STRING ] option ?

Yes, if you are building your own OS.  (How?  See answer to next question below.)

I think it would be a bad idea otherwise.

As you have probably discovered already, you cannot "opt in" by specifying -D_GLIBCXX_FULLY_DYNAMIC_STRING on a per-compile basis.  As with all the GCC internal flags that start with _GLIB... they are platform specific and should not be modified lightly.

Everything needs to be compiled with that flag uniformly, including the GCC's Standard C++ library, and any other C++ library referenced.

I presume you are running into the situation where two libraries (or a library and an executable) have different notions about the empty string used in that optimization, and is causing an interaction where one is trying to free the static empty buffer from the other.  And then bad things happen.  The general solution to that problem is to make sure the empty string buffer is external link visible (i.e., visibility default, rather than visibility hidden) instead of package visible (i.e., visibility hidden).

> -if true, how to do this please ?

I think you need to configure GCC using --enable-fully-dynamic-string when building GCC for your custom OS.


More information about the Gcc-help mailing list