https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105688
--- Comment #34 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Vincent Lefèvre from comment #33) > (In reply to Andrew Pinski from comment #32) > > The runpath won't work because the libraries are installed yet. > > This is what libtool does for GNU MPFR, and this works fine. For instance, > when building test programs, I can see: > > -Wl,-rpath -Wl,/home/vinc17/software/mpfr/src/.libs > > so that it doesn't need to change LD_LIBRARY_PATH. (The test programs don't > need to be installed, so that using the path to the build directory will not > yield any issue, but AFAIK, if need be, libtool supports relinking of > programs to be installed.) Relinking is a no go really for GCC as far as I know. Especially when you might build as one user and install as another (root); relinking causes so many issues in the past too.