On Fri, 29 May 2020 at 04:53, Dan Kegel wrote: > > https://stackoverflow.com/questions/13334300/how-to-build-and-install-gcc-with-built-in-rpath > is a bit dated, but might be helpful. It says in part: >  > Using --with-boot-ldflags="-Wl,-rpath,/some/path" on the configure > step seems to work for me on gcc 4.8.3. The docs discuss this a bit > https://gcc.gnu.org/install/configure.html That sets the linker flags to use when building GCC itself. It doesn't make GCC automatically add those linker flags when you compile your own programs. Even if it did add the flags when compiling your own programs, it wouldn't work well for multlib compilers where the rpath should be lib or lib64 depending on the multilib being used for a given compilation.