public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* specs and libstdc++ and linux
@ 2002-10-02 12:57 Benoit Hudson
  0 siblings, 0 replies; only message in thread
From: Benoit Hudson @ 2002-10-02 12:57 UTC (permalink / raw)
  To: gcc-help

My users don't want to need to know where gcc is.  I've figured out how to
modify the specs so that when we link to the shared gcc_s I add appropriate
flags to add the location of libgcc_s to the rpath.  This appears to be
sufficient on solaris to also catch when libstdc++ is dynamically linked to.

Specifically, I modify:
*link_gcc_c_sequence:
%(my_rpath) %G %L %G

Also, I add:
*my_rpath_flags:
-R /path/to/gcc/lib

*my_rpath:
%{static|static-libgcc:}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:}%
{shared-libgcc:%(my_rpath_flags)}}%{shared:%(my_rpath_flags)}}}


Unfortunately, this hack doesn't work under linux: my_rpath_flags never
gets expanded (I can set it to %eexpanded and no error occurs), which means
that apparently I'm specifying -static or -static-libgcc by default, unless
I am reading the spec wrong.  Despite this, libstdc++ is linked in
dynamically.  

Ideally, I'd want the rpath to be set if and only if I link dynamically to
libstdc++.so or libgcc_s.so ; any ideas on how to achieve this?

        -- Benoît

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-02 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-02 12:57 specs and libstdc++ and linux Benoit Hudson

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).