I'm having trouble confirming my understanding of how the rpath link works when cross-compiling with the specific tool chain I use (although I think this is a general question that applies to cross-compilation in general).
When I look at what flags are passed to the compiler and linker when creating libraries and applications, I see the following passed to the linker:
-Wl,-rpath-link,/home/Dev/env/sys/crosscompiletoolchain/armle-v7/lib/
So this is the path that is built into the shared libraries that are created for the target device on my development machine. This makes sense because I will be making the final binding on the development machine before deployment to the device. When I finally deploy to the device (i.e., shared libs + application), will these shared libraries not have a useless rpath link?
Built-in libraries and applications seem to work fine on the target side, and if I have to guess that I will say it because the application has an environment provided by the deviceβs operating system, which has / lib / as one of its default library search paths ( rpath-link defines only the first set of search engines). Is it correct?
source share