Module Name: src
Committed By: christos
Date: Mon Jun 1 14:39:14 UTC 2020
Modified Files:
src/share/mk: bsd.README bsd.lib.mk
Log Message:
1. if ${LIBISPRIVATE} == "pic", create _pic.a so that we can embed the library
to another shared object
2. Don't compare ${LIBISPRIVATE} to "yes", because there are 3 places in
Makefiles which set it to empty (this was a bug)
3. For private libraries, don't create .so* files
To generate a diff of this commit:
cvs rdiff -u -r1.405 -r1.406 src/share/mk/bsd.README
cvs rdiff -u -r1.382 -r1.383 src/share/mk/bsd.lib.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.405 src/share/mk/bsd.README:1.406
--- src/share/mk/bsd.README:1.405 Sat May 30 16:47:59 2020
+++ src/share/mk/bsd.README Mon Jun 1 10:39:14 2020
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.README,v 1.405 2020/05/30 20:47:59 christos Exp $
+# $NetBSD: bsd.README,v 1.406 2020/06/01 14:39:14 christos Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@@ -1342,6 +1342,8 @@ LIBISMODULE If not "no", install as ${LI
LIBISPRIVATE If not "no", act as "MKDEBUGLIB=no MKLINT=no MKPIC=no
MKPROFILE=no", and don't install the (.a) library.
This is useful for "build only" helper libraries.
+ If set to "pic", then a _pic.a library is also produced,
+ so that it can be incorporated into other shared objects.
Default: no
LIBISCXX If not "no", Use ${CXX} instead of ${CC} to link
Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.382 src/share/mk/bsd.lib.mk:1.383
--- src/share/mk/bsd.lib.mk:1.382 Sat May 30 15:51:32 2020
+++ src/share/mk/bsd.lib.mk Mon Jun 1 10:39:14 2020
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.lib.mk,v 1.382 2020/05/30 19:51:32 christos Exp $
+# $NetBSD: bsd.lib.mk,v 1.383 2020/06/01 14:39:14 christos Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk>
@@ -30,7 +30,7 @@ MKLINT:= no
MKPICINSTALL:= no
. if defined(NOSTATICLIB) && ${MKPICLIB} != "no"
MKSTATICLIB:= no
-. elif ${MKPICLIB} == "no"
+. elif ${LIBISPRIVATE} != "pic"
MKPIC:= no
. endif
MKPROFILE:= no
@@ -118,6 +118,7 @@ print-shlib-teeny:
@false
.endif
+.if ${LIBISPRIVATE} == "no"
.if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR) # {
.if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
.if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
@@ -129,6 +130,7 @@ SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB
SHLIB_FULLVERSION=${SHLIB_MAJOR}
.endif
.endif # }
+.endif
# add additional suffixes not exported.
# .po is used for profiling object files.
@@ -170,7 +172,7 @@ MKSHLIBOBJS= no
# We only add -g to the shared library objects
# because we don't currently split .a archives.
CSHLIBFLAGS+= -g
-.if ${LIBISPRIVATE} == "yes"
+.if ${LIBISPRIVATE} != "no"
CFLAGS+= -g
.endif
.endif