linking with -Wl,-rpath and $(prefix)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Someone recently mentioned on this group a method to affect linking.  It
was:

-Wl,-rpath,$(prefix)/lib

I've seen some information about this in the FAQ but perhaps it's late in
the day or something but I really don't fully understand what is achieved
here and how.  If I read the FAQ correctly one would pass this into GCC when
compiling one's code so that the resultant user binary resolves its
dependencies in the normal way but with the extra help of the directories
specified by -rpath.  Is that correct? If so does $(prefix) equal the prefix
set when GCC itself was compiled with ./configure --prefix=<dir> ?

Or perhaps this -Wl option is passed into GCC itself when it is compiled?

Is there a page with a fuller explanation of how GCC linking works?

Thanks,
David.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux