This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How do I add missing stdc functions to libstdc++-v3?
On 2012-03-20, at 10:41 PM, Vaugha Brewchuk wrote:
>
> On 2012-03-20, at 6:48 PM, Ian Lance Taylor wrote:
>
>> Vaugha Brewchuk <vaugha_brewchuk@yahoo.ca> writes:
>>
>>> I just had a good look at both static libraries that were generated during the build process, libstdc++ and libsupc++. I found that libstdc++ has in it all the objects from libsupc++ with the exception of eh_aux_runtime.o and eh_personality.o. This explains why I get linker warnings with missing symbols __gxx_personality_sj0 and __cxa_call_unexpected. Can you please confirm that these objects need to be statically linked into libstdc++? I can then figure out why they have been omitted.
>>
>> Yes, those objects should be in the static libstdc++.a archive. They
>> should also be in the static libsupc++.a archive. I don't know why they
>> would be missing for you.
>>
>> Ian
>
> This helps a lot, since now I know "why" and I just need to identify the "how". To help, I built gcc-3.2.3 with static libraries on a virtualized Ubuntu 4.10 and confirmed that the two objects are in both libraries. I will compare the build processes to determine why on NEXTSTEP eh_aux_runtime.o and eh_personality.o are in libsupc++ only and are missing in libstdc++.
>
> Thank you again!
I was able to identify the root cause of the problem. The 'ar' implementation on NEXTSTEP truncates object file names to 15 characters:
ar: filename eh_aux_runtime.o truncated to eh_aux_runtime.
ar: filename eh_personality.o truncated to eh_personality.
Consequently these objects extracted from libsupc++ have truncated file names and do not get picked-up by libtool when creating libstdc++. I also found an interesting post relating to this issue: http://lists.gnu.org/archive/html/bug-libtool/2011-11/msg00002.html
I will patch libtool supplied in gcc to fix this issue on NEXTSTEP.
Thank you once again for everyone's help and patience.