This is the mail archive of the
mailing list for the binutils project.
Re: gold library search path?
2011/7/14 Ian Lance Taylor <firstname.lastname@example.org>:
> Per Øyvind Karlsen <email@example.com> writes:
>> I feel a bit silly for not being able to figure this out, trying
>> to go through the search over and over, googling and blah,
>> but I'm totally not able to figure out how to set the library search
>> of the gold linker during build..?
>> Passing '--with-lib-path=/lib64:/usr/lib64:/usr/local/lib64:/usr/lib:/usr/local/lib'
>> to configure gives me the expected behaviour I want with the bfd linker,
>> but gold only wants to try search /lib & /usr/lib no matter what.. :|
>> So that makes me wonder whether this actually might be a bug or not,
>> while still feeling a bit st00pid.. :p
> You're not stupid, there actually isn't a way to set gold's default
> library path using a configure option.
> I see that GNU ld does support a --with-lib-path configure option, and I
> would not be opposed to supporting it in gold either. ?The current
> default (/lib:/usr/lib, adjusted for any --sysroot option) is set in
> General_options::finalize in option.cc.
Ah, that explains it, I think that was where I found the traces of it
in the code,
but I figured that there had to like more "proper" and some actual "correct"
place to do it.
I guess I'll just patch option.cc for now, while awaiting for gold to support
the --with-lib-path option as well. :o)