-shared-libgcc vs. -static -static-libgcc
Alexandre Oliva
aoliva@redhat.com
Wed Feb 27 22:01:00 GMT 2002
On Feb 27, 2002, Benjamin Kosnik <bkoz@redhat.com> wrote:
>> 1) rework init_gcc_specs() again such that -static-libgcc overrides
>> -shared-libgcc in the absence of -shared, just like it does in the
>> presence of -shared
>>
>> 2) rework init_gcc_specs() such that -static alone overrides
>> -shared-libgcc, regardless of -shared
>>
>> 3) arrange for CXX to not be passed with -shared-libgcc to
>> libstdc++-v3 and libgcj, and get -shared-libgcc into CXX only for
>> libtool -shared configuration and shared-library creation.
> Perhaps I'm missing something, but I would think that passing
> -shared-libgcc down as part of CXXFLAGS instead of part of CXX is also a
> possibility.
There's little point in cluttering the top-level configure.in with
such an internal detail of libstdc++-v3 and libjava. I should have
realized this upfront. While at that, I went ahead and removed the
assumption that libjava depends on libstdc++-v3 from libstdcxx_flags,
as I suggested in another thread.
>> I'll look into implementing all of the above, even though any one of
>> them would suffice. But I think having the 3 of them would make it
>> more consistent. Any disagreement?
> I think that would be wonderful.
Ok, here's what I've come up with. Tested on athlon-pc-linux-gnu,
both with and without a recent ld. libstdc++-v3 and libjava built
correctly (i.e., were linked with libgcc_s), and libjava binaries no
longer depend directly on libgcc_s, as intended. I have verified that
we get correct semantics when using -static and -static-libgcc with
and without -shared.
As co-maintainer of configury stuff, I could have checked in most of
this in, and the problem would be solved, but I thought I'd check it
in as a unit, which means I have to wait for approval for the change
in gcc.c. Ok to install?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cxx-shared-libgcc.patch
Type: text/x-patch
Size: 6448 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020227/d285dfc7/attachment.bin>
-------------- next part --------------
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Gcc-patches
mailing list