This is the mail archive of the mailing list for the binutils 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: linking against libbfd without modify LD_LIBRARY_PATH

On Monday 05 December 2011 08:05:36 Baojun Wang wrote:
> Many thanks for your help Mike.
> The distro is gentoo (~amd64, up-to-dated) ;)
> RPATH is /usr/lib64/binutils/x86_64-pc-linux-gnu/2.22

binutils-config in Gentoo takes care of setting up an ldpath that is full of 
links to all the binutils libraries.  seems to be working for me:
$ cat /etc/
$ echo 'main(){}' > test.c
$ gcc test.c -lbfd
$ ldd a.out  | grep bfd => /usr/x86_64-pc-linux-gnu/lib/ 

> The problem is there is no such tool like pkg-config which can output
> the lib path automatically, IE:
> pkg-config --cflags --libs glib-2.0
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -lglib-2.0

the binutils project doesn't provide .pc files, so i'm not going to generate 
one for Gentoo as it'd encourage forking

also, please don't top post

Attachment: signature.asc
Description: This is a digitally signed message part.

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