On 10 September 2014 10:59, Shaun Jackman <sjackman@xxxxxxxxx> wrote: > > 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 To override the standard search directories, I added `-nostdlib` to the `link_libgcc` spec. *link_libgcc: -nostdlib -L/home/sjackman/.linuxbrew/Cellar/gcc/4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1 -L/home/sjackman/.linuxbrew/lib *link: + -rpath /home/sjackman/.linuxbrew/lib --dynamic-linker /home/sjackman/.linuxbrew/opt/glibc/lib/ld-linux-x86-64.so.2 Cheers, Shaun