Re: [PATCH] Transitive LIBDPLIBS, PROGDPLIBS

Rhialto <[email protected]> Sat, 18 Jan 2025 23:04:30 +0100
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
On Wed 15 Jan 2025 at 10:32:29 -0800, Greg A. Woods wrote:
> At Wed, 15 Jan 2025 08:19:14 +0000, Taylor R Campbell <[email protected]> wrote:
> Subject: [PATCH] Transitive LIBDPLIBS, PROGDPLIBS
> > (b) the necessary -l arguments are passed through (just -lsqlite3 for
> >     dynamic builds; -lsqlite3 -lm for static builds); and
> 
> This part I've never understood.  Why is there reluctance to require
> '-lm' for dynamic builds?  These small efficiencies lead to confusion
> and ignorance, as is evident in how much of a mess X11 linking is for
> many third-party programs.

No I don't want to include transitive dependencies in the linker command
line. If I use libfoo, its transitive dependencies are an implementation
detail I don't want to need to bother with. They can change without
notice, too.

I am still quietly hoping that some more tree-like namespace model comes
in fashion. For example, if prog depends on libfoo depends on libbar,
then only references from libfoo are allowed to be resolved by libbar.
If prog calls a function of libbar, it would need to be specified on the
linker command line. This could even go further and possibly allow
different versions of a libthree to be linked, since each version would
only be called by the correct caller and not another one.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert                            <rhialto/at/falu.nl>
\X/ There is no AI. There is just someone else's work.           --I. Rose
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEFVAhiiWjqgwBVdQAmYnGRWHD+9MFAmeMJWkACgkQmYnGRWHD
+9NL/Af+Ld4NFJ82LlnpuW5b48cG4Yax/U18shNAJ2bt2ZCR49HgOZ7+8JKrZqKq
G5bFPQRAocjfxh340Tr1PTtFJignFIve7D7/iMzLaPv1MFm+PL9cUMFwIJorMjV7
o5kSH/lpTrXlEQMn42Q80XxDXp4EgAEih7hfcpsrT/c/LQw3A8Q/hzATTl5JwN6d
tMIHNOe8MdrQXuhA8ma9HO0LpKnVFQLiB4Fpm60BiAcWYHcbZX19J6puWyOdfsBC
TMrXYbCST1WgjpaCtrWd5qvv/qfnZB0VyyrOcd0tQMoFwotzhKCt2IeukWesMiBt
mUcGuOA5cbqml6tSYf3qkvAv88EJFA==
=VNpz
-----END PGP SIGNATURE-----