Instead of giving -Wl,-rpath=$HOME/local/gcc52/lib64
to each invocation of GCC 5.2 which I built from the source, I modified its spec
file in this way:
*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) -rpath=%:getenv(HOME /local/gcc52/lib64) ...
But this depends on my specific installation under $HOME/local/gcc52
. Are there better way to refer to the installation path of the invoked GCC itself?
This manual page did not help me much: