This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 4.0.0 x86_64 static linking of libstdc++.a


On Tue, 24 May 2005, Roland Lengfeldner stated:
> First, of all, thanks for your answer.
>> Well, that's pretty clear: recompile libstdc++.a with -fPIC (which means
>> rebootstrapping GCC with distinctly unusual CXXFLAGS) or take out that
>> explciit linkage to libstdc++.a.
>
> Ok, I'm just doing a new bootstrap, in order to generate a libstdc++.a with
> -fPIC.

OK.

>> (You should be using the c++ or g++ drivers for this, anyway.)
>>
> No option, because I need to generate a file which does NOT depend on a
> particular libstdc++.so file installed in a given directory, therefore
> static linking with gcc. 

This will cause (possibly severe) problems if you link anything else in
the eventual process image against libstdc++, especially different
versions of it, or if at any point exceptions need to traverse
inter-shared-library boundaries (because of your forcing of a static
libgcc). The least I'd expect is exceptions missing catches that you'd
expect under language rules they'd be caught by.

-- 
`Once again, I must remark on the far-reaching extent of my
 ladylike nature.' --- Rosie Taylor


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]