On 9 September 2014 17:13, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > On Tue, Sep 9, 2014 at 3:30 PM, Shaun Jackman <sjackman@xxxxxxxxx> wrote: >> Alternatively, how can I modify the default `specs` file of GCC to add >> to the default linker options >> -L$prefix/lib -Wl,-rpath,$prefix/lib -Wl,--dynamic-linker >> $prefix/lib/ld-linux-x86-64.so.2 > > If you want to go that route, add it to the line after "*link:" in the > specs file. That worked like a charm! Thanks, Ian. I replaced the link spec like so: *link: -L/home/sjackman/.linuxbrew/lib -rpath /home/sjackman/.linuxbrew/lib --dynamic-linker /home/sjackman/.linuxbrew/lib/ld-linux-x86-64.so.2 How do I remove the following four directories from the library search path, while still retaining the $prefix/lib and $prefix/lib/gcc/* directories? /lib64 /usr/lib64 /lib /usr/lib Thanks again, Shaun