ld compat linker warnings considered harmful

Thomas Klausner <[email protected]>
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
Hi!

For library function renaming to work, NetBSD uses header macros to
use the latest version of a function, so that the old symbol still
stays available for programs that were linked against the previous
version of the function.

There is also a linker warning so that you do not use the old
functions by accident, because you forgot including the header, e.g.:

ld: /usr/lib/libm.so.0: warning: warning: reference to compatibility cabs()

The (known) problem is that this linker warning also triggers when it
shouldn't, when libraries are pulled in indirectly and the functions
not even used by the program that (indirectly) links against them.

The latest meson now defaults to fatal linker warnings, which causes
programs fail to build because of this.

See e.g.

https://releng.netbsd.org/pkgreports/shadow/HEAD/NetBSD-11.0-x86_64/20260816.2028/libliftoff-0.5.0/build.log

Can someone please fix the linker warnings so they only trigger when
necessary?

Thanks,
 Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.