* How to compile libstdc++.a libgcc.a with -fPIC ?
@ 2009-04-22 21:31 Ulrich Holtmann
2009-04-22 22:06 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Holtmann @ 2009-04-22 21:31 UTC (permalink / raw)
To: gcc-help
Hi,
is it possible to configure gcc 4.2.2 as
"--disable-shared" + "-fPIC for libstdc++.a, libgcc.a, ..." ?
I want to use libstdc++.a for building a shared library on Linux RH4 64-bit
in order to avoid dependencies to LD_LIBRARY_PATH.
Second question: is this advisable? I see hints that exception handling across
boundaries of shared libraries may fail in this case.
Ulli
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to compile libstdc++.a libgcc.a with -fPIC ?
2009-04-22 21:31 How to compile libstdc++.a libgcc.a with -fPIC ? Ulrich Holtmann
@ 2009-04-22 22:06 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2009-04-22 22:06 UTC (permalink / raw)
To: Ulrich Holtmann; +Cc: gcc-help
Ulrich Holtmann <Ulrich.Holtmann@synopsys.com> writes:
> is it possible to configure gcc 4.2.2 as
> "--disable-shared" + "-fPIC for libstdc++.a, libgcc.a, ..." ?
No.
> I want to use libstdc++.a for building a shared library on Linux RH4 64-bit
> in order to avoid dependencies to LD_LIBRARY_PATH.
That explains the --disable-shared, but why the -fPIC?
> Second question: is this advisable? I see hints that exception
> handling across boundaries of shared libraries may fail in this case.
If your linker does not support the --eh-frame-hdr option, then you need
to use a shared libgcc. If your linker does support --eh-frame-hdr,
then throwing exceptions across shared library boundaries should work
even without a shared libgcc. This requires that the executable and all
shared libraries are linkd using --eh-frame-hdr--it won't work with old
shared libraries.
Ian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-22 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-22 21:31 How to compile libstdc++.a libgcc.a with -fPIC ? Ulrich Holtmann
2009-04-22 22:06 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).