Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: riastradh
Date: Tue Dec 16 04:21:03 UTC 2025
Modified Files:
src/distrib/sets/lists/base: mi
src/etc/mtree: NetBSD.dist.base
src/share/mk: bsd.README bsd.lib.mk bsd.prog.mk
Log Message:
Add logic for /usr/lib/private libraries.
New variables for makefiles to define:
<bsd.lib.mk> LIBSUBDIR -- If nonempty, install library into
${LIBDIR}/${LIBSUBDIR} instead of ${LIBDIR}. Typically set
either to empty or to `private'.
<bsd.lib.mk> LIBDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking library. Note: Should only be used inside
private libraries, not inside public libraries to link against
private libraries, which can't work -- see comment.
<bsd.prog.mk> PROGDPSUBDIRS -- List of subdirectories _subdir_ to add
-L${SHLIBDIR}/${_subdir_} -Wl,-R${SHLIBDIR}/${_subdir_} to
ldflags when linking program.
(XXX bsd.lib.mk/bsd.prog.mk should figure LIBDPSUBDIRS/PROGDPSUBDIRS
out automatically by LIBDPLIBS/PROGDPLIBS, but for now we don't have
that mechanism -- TBD in subsequent work.)
Libraries that we want to install because we use them in binaries we
ship, but that we want to keep private from applications so we don't
have to worry about ABI breakage or leakage into pkgsrc builds,
should generally set:
LIBSUBDIR= private # Install into /usr/lib/private.
NOCOMPAT= # defined # Don't build compat lib.
NOLINKLIB= # defined # Don't install .so link or .a lib.
(XXX Maybe we should have a `LIBISPRIVATE= installed' or something
for this combination of options, but for now I'm putting in the
minimal mechanism to implement this and we can condense a common
pattern later.)
Programs using the library will also have to set
PROGDPSUBDIRS+= private
so that they will get the rpath /usr/lib/private.
PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib
To generate a diff of this commit:
cvs rdiff -u -r1.1370 -r1.1371 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.261 -r1.262 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.456 -r1.457 src/share/mk/bsd.README
cvs rdiff -u -r1.422 -r1.423 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.357 -r1.358 src/share/mk/bsd.prog.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index