On 10 September 2014 10:59, Shaun Jackman <sjackman@xxxxxxxxx> wrote: > 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 Note that replacing the link spec is a patently bad idea and breaks building shared libraries (and probably other things). I should have appended to the link spec by using the `+' function. *link: + -L/home/sjackman/.linuxbrew/lib -rpath /home/sjackman/.linuxbrew/lib --dynamic-linker /home/sjackman/.linuxbrew/lib/ld-linux-x86-64.so.2 Cheers, Shaun