I can’t seem to find a way to get -Wl,-rpath,'$ORIGIN'
to get passed to the linker on linux builds. Or, rather, if it’s getting passed in, it doesn’t appear to be getting processed correctly because I’m not seeing an RPATH entry in the dynamic section of the elf executable, as determined from readelf
.
This is how I’m setting the option in my build script:
cppCompiler.args '-Wl,-rpath,\'$ORIGIN\''
…and I can see the option listed apparently correctly in the options.txt file under the build file system:
-x
c++
-c
-D_DEBUG
-Wl,-rpath,'$ORIGIN'
...others
…but when I run readelf -d <executable-name>
, there is no RPATH entry to be found anywhere.
Anyone else had any luck with this linker option?