what is -rpath supposed to do?
David Wragg
dpw@doc.ic.ac.uk
Thu Dec 9 16:32:00 GMT 1999
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
More information about the Gcc-help
mailing list