This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]