This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Adding to the *end* of the gnu ld library search paths
- From: Bryce Schober <bryce dot schober at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 24 Aug 2011 15:09:19 -0700
- Subject: Adding to the *end* of the gnu ld library search paths
I know how to add to GNU ld's library search path using the -Ldir
option and use it extensively. But as far as I can tell from reading
the manuals of?gcc?and?ld, there is no way to add to the?end?of the
list of library search paths.
The -L option adds to the beginning, after which it searches the
default system library paths. But I want to add a
look-here-if-you-can't-find-it-anywhwere-else path. Is there any way
to do that with ld?
I can imagine a hacky-crap solution that extracts all standard library
dirs (using -print-search-dirs) and adds them to the list of -L search
dirs in the order I desire, ahead of their implied duplicates as
default search paths...
But there?must?be a better way...
<>< ?<>< ?<><
Bryce Schober