This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setting the dynamic linker with an environment variable


On 10 September 2014 10:59, Shaun Jackman <sjackman@gmail.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]