From: Dennis Clarke <dclarke@blastwave.org>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: Jim Rice <jmrice6640@yahoo.com>, gcc-help@gcc.gnu.org
Subject: Re: A question about RPATH
Date: Thu, 20 Dec 2012 00:31:00 -0000 [thread overview]
Message-ID: <fba9bcf777fd.50d21615@blastwave.org> (raw)
In-Reply-To: <CAH6eHdQQ-8fniqyaECdy3_3E=ZUmS7YJUE3LjkWHrkROyPnTrA@mail.gmail.com>
> On 20 December 2012 00:15, Dennis Clarke wrote:
> >
> >> > I am a firm believer that LD_LIBRARY_PATH is evil, certainly
> >> > at least dangerous and the
> >> > output binary from any compile should have an RPATH set to
> >> > ensure that the correct
> >> > libs are found that the developer wanted.
> >> >
> >> > Having said all that, is there a magic
> >> > LD_OPTIONS_INCANTATION=-Wl,-rpath=/usr/local/lib type thing
> >> > to set to ensure I get my RPATH ? I should point out
> >> > this is trivial to do in the Solaris world and perhaps I am
> >> > missing something really obvious here.
>
> GCC does not tell the linker to set RPATH unless explicitly requested,
> see http://gcc.gnu.org/faq.html#rpath
I guess because I tend to enjoy the Linux From Scratch project I like to build a
compiler which is isolated away from the host operating system that I am
doing the build with. Ultimately I can get a full GNU toolchain in /usr/local
that is self enclosed and will not use libs from /usr/lib etc.
> > So I will rebuild gcc with
> LD_RUN_PATH=/usr/local/lib:/usr/local/gcc4/lib64 and see what
> > I get.
>
> That's what I've done when building on Solaris
I have a good hands on familiarity with Solaris/OpenSolaris and have managed
to get reasonable toolchains built there. In that case I tend to use LD_OPTIONS
as well as a few options passed to the compiler to get the desired RPATH.
> although in my case it
> was for the runtime libs, not the gcc executables (see
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354#c9). There has been
> a suggestion to add a new configure option to set RPATHs, see
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45508#c10
Well I am all for a RPATH option.
Dennis
next prev parent reply other threads:[~2012-12-20 0:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 23:08 Dennis Clarke
2012-12-19 23:21 ` Jim Rice
2012-12-19 23:57 ` Dennis Clarke
2012-12-20 0:15 ` Dennis Clarke
2012-12-20 0:19 ` Jonathan Wakely
2012-12-20 0:31 ` Dennis Clarke [this message]
2012-12-20 2:26 ` Dennis Clarke
2012-12-20 9:42 ` Andrew Haley
2012-12-20 11:01 ` Dennis Clarke
2012-12-20 14:51 ` Andrew Haley
2012-12-20 11:40 ` Jonathan Wakely
2012-12-20 14:54 ` Andrew Haley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fba9bcf777fd.50d21615@blastwave.org \
--to=dclarke@blastwave.org \
--cc=gcc-help@gcc.gnu.org \
--cc=jmrice6640@yahoo.com \
--cc=jwakely.gcc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).