This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Setting the dynamic linker with an environment variable
- From: Shaun Jackman <sjackman at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Fri, 12 Sep 2014 11:26:34 -0700
- Subject: Re: Setting the dynamic linker with an environment variable
- Authentication-results: sourceware.org; auth=none
- References: <CADX6M3rJQdiwzqMxvDxsd6p=pobSGEHGeZfv79-YA9ZQxxcS2g at mail dot gmail dot com> <CAKOQZ8yUvpvGn0GDQ3+mdGHSaze69xnpHJdRB=7ci2QkD-DdhQ at mail dot gmail dot com> <CADX6M3qM_BwokykwDbkPFWusoDHsJyruXjyAmiGOeB-nuBSM_A at mail dot gmail dot com>
- Reply-to: Shaun Jackman <sjackman at gmail dot com>
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