I am trying to use the gold linker to compile my code, but it does not search 开发者_StackOverflow中文版for libraries in /usr/local/lib by default. I tried adding /usr/local/lib in /etc/ld.so.conf.d/ and it still does not work. It is as if gold is not checking the /etc/ld.so.conf stuff. I can add
-L/usr/local/lib
in my Makefile and it works, but is there an other way to make gold search it by default?
Thanks
UPDATE:
I found the creator of gold talking about the issue http://old.nabble.com/gold-library-search-path--td32057398.html. It seems gold just does not support it as of July 2011.
There are also the LDFLAGS enviroment variable, but like ld.so.conf it might be LD specific with gold not respecting them.
In that case, only going through the gold documentation will help.
精彩评论