bug-guix
[Top][All Lists]
Advanced

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

bug#71326: ld-wrapper does not handle all possibilities to specify libra


From: Stefan
Subject: bug#71326: ld-wrapper does not handle all possibilities to specify libraries and their search paths
Date: Sun, 2 Jun 2024 15:29:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

Hi!

Beside using an absolute path, the ld of Binutils has eight ways¹ to pass a 
library like libfoo.so via options:

-lfoo
-l foo
-library=foo
--library=foo
-l:libfoo.so
-l :libfoo.so
-library=:libfoo.so
--library=:libfoo.so

The ld-wrapper however only supports one of these possibilities, which is the 
most common: -lfoo. GCC itself does not support the -[-]library= variants.


Similarly there are four ways to specify a library search path /bar for ld:

-L/bar
-L /bar
-library-path=/bar
--library-path=/bar

The ld-wrapper only supports the first two. GCC itself does not support the 
-[-]library-path= variant.


The lld form the LLVM project supports all these different options as well.


Bye

Stefan


¹ <https://sourceware.org/binutils/docs-2.42/ld/Options.html>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]