[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Avoiding useless library dependencies

Jakub Wilk <jwilk@debian.org> writes:
> * Nikolaus Rath <Nikolaus@rath.org>, 2011-05-22, 13:56:
>>gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.7/src/llfuse.o -o build/lib.linux-x86_64-2.7/llfuse.so --as-needed -pthread -lfuse -lrt -ld
> You want to use "-Wl,--as-needed", not "--as-needed". ("--as-needed"
> is a linker option, not a compiler option.)

Doesn't seem to make any difference:

gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6/src/llfuse.o -o build/lib.linux-x86_64-2.6/llfuse.so -Wl,--as-needed -pthread -lfuse -lrt -ldl
copying build/lib.linux-x86_64-2.6/llfuse.so -> src

$ ldd src/llfuse.so 
	linux-vdso.so.1 =>  (0x00007fff63dff000)
	libfuse.so.2 => /usr/lib/libfuse.so.2 (0x00007fe771490000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x00007fe771274000)
	libc.so.6 => /lib/libc.so.6 (0x00007fe770ef0000)
	librt.so.1 => /lib/librt.so.1 (0x00007fe770ce8000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007fe770ae4000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fe77193b000)



 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

Reply to: