This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: what is -rpath supposed to do?
- To: help-gcc at gnu dot org
- Subject: Re: what is -rpath supposed to do?
- From: David Wragg <dpw at doc dot ic dot ac dot uk>
- Date: 10 Dec 1999 00:28:40 +0000
- Newsgroups: gnu.gcc.help
- Organization: (Posted via) U-NET Internet Ltd.
- References: <82nuhn$15r43@estavous.sfr.fr> <slrn84vaet.eu.nubis@ban.osiris.home>
- Xref: wodc7nx0 gnu.gcc.help:2140
nubis@ban.osiris.home () writes:
> On Thu, 9 Dec 1999 10:59:17 +0100, Cegetel <Cegetel@Cegetel.com>
> wrote:
> >Hi all, I'm trying to build Apache 1.3.9 for my Linux box (Suse 6.2).
> >But there's a -rpath option used in the configuration file that seems
> >not to be known by gcc... As you could expect, a path follows this
> >option...
>
> The -rpath option should given to the linker ld. It is the same as -L
> for gcc. I rember compiling apache I had the same problem and changed
> all -rpath to -L in the Makefiles. Maybe not the propper method to
> this, but worked for me.
-rpath is certainly not the same as -L. They have very different
purposes; see the ld info pages for what -rpath really does.
gcc does not understand -rpath, because it is a linker option. It
seems strange that apache would be passing this to gcc. The fix is to
tell gcc that the -rpath option should be passed on to the linker,
with -Wl,-rpath,<arg>
David Wragg