Source-Changes-HG archive

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

[src/trunk]: src/share/mk 1. if ${LIBISPRIVATE} == "pic", create _pic.a so th...



details:   https://anonhg.NetBSD.org/src/rev/1eda2b7b7731
branches:  trunk
changeset: 933970:1eda2b7b7731
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jun 01 14:39:14 2020 +0000

description:
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

diffstat:

 share/mk/bsd.README |  4 +++-
 share/mk/bsd.lib.mk |  8 +++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (61 lines):

diff -r 1fcfdae6732d -r 1eda2b7b7731 share/mk/bsd.README
--- a/share/mk/bsd.README       Mon Jun 01 13:58:14 2020 +0000
+++ b/share/mk/bsd.README       Mon Jun 01 14:39:14 2020 +0000
@@ -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 @@
 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
diff -r 1fcfdae6732d -r 1eda2b7b7731 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Mon Jun 01 13:58:14 2020 +0000
+++ b/share/mk/bsd.lib.mk       Mon Jun 01 14:39:14 2020 +0000
@@ -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 @@
 MKPICINSTALL:= no
 . if defined(NOSTATICLIB) && ${MKPICLIB} != "no"
 MKSTATICLIB:=  no
-. elif ${MKPICLIB} == "no"
+. elif ${LIBISPRIVATE} != "pic"
 MKPIC:=                no
 . endif
 MKPROFILE:=    no
@@ -118,6 +118,7 @@
        @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}
 .endif
 .endif                                                                 # }
+.endif
 
 # add additional suffixes not exported.
 # .po is used for profiling object files.
@@ -170,7 +172,7 @@
 # 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



Home | Main Index | Thread Index | Old Index