]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Normalize names of libtool convenience libraries
authorBenjamin Kaduk <kaduk@mit.edu>
Fri, 12 Sep 2014 19:41:23 +0000 (15:41 -0400)
committerD Brashear <shadow@your-file-system.com>
Wed, 8 Oct 2014 14:47:55 +0000 (10:47 -0400)
Part of why libtool was introduced into the tree was to reduce the
number of times each source file is compiled.  PIC code is needed
for shared objects, and non-PIC code for static libraries, so in most
cases a C file must be compiled twice, but not more than that.

Libtool automatically manages which version of an object is passed to
the linker when libtool is used to link .la files.  At several places
in the tree (libafsrpc, libafsauthent, libuafs_pic.so, and pam_afs.so)
we use libtool to link a .la library and pass other .la libraries in
as linker inputs.  In normal situations, libtool would produce an
output shared library that registered a shared library dependency on
the (shared version of the) input library.  However, in our usage,
these input .la libraries are used only for our convenience, and are
not intended to be installed, so libtool would produce an output
library that was not usable.

Libtool refers to our usage of libraries not intended to be installed
as "convenience libraries"; for us, they are essentially just
static archives that contain PIC objects (as opposed to normal
static archives which contain non-PIC objects).

Prior to this commit, we had named our convenience libraries things
like libafsauthent_auth.la or libafsrpc_comerr.la, since they were
mostly only used for either libafsrpc or libafsauthent.  However,
future commits will need to use some of these convenience libraries
in other shared objects (such as pam_afs.so), so we normalize the
library name to indicate merely that it is a PIC version of that
module.

There are three exceptions to this rule: libafsrpc_sys.la, which
contains only a single file and not the whole of the sys module,
libafsrpc_util.la, which contains a subset of the util objects,
and libauthent_ubik.la, which contains a subset of the ubik
objects.  Since these convenience libraries are in fact tailored to
the particular application, a target-specific name is appropriate.

The convenience library provided by the ptserver module is named
libprot_pic to match the existing public interface libprot.a.

We cannot link the dependencies of the convenience libraries
directly into them, because any given object may only be linked
once into a given library, and our dependency graph between
modules is decidedly not a tree, so attempting to link in the
dependencies would result in duplicate symbol errors.

Change-Id: I5f10af74b8582edd51e5f1b3f0026dbc7ef9f7ad
Reviewed-on: http://gerrit.openafs.org/11459
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
17 files changed:
src/audit/Makefile.in
src/auth/Makefile.in
src/comerr/Makefile.in
src/crypto/rfc3961/Makefile.in
src/fsint/Makefile.in
src/kauth/Makefile.in
src/libafsauthent/Makefile.in
src/libafsrpc/Makefile.in
src/lwp/Makefile.in
src/ptserver/Makefile.in
src/rx/Makefile.in
src/rxgk/Makefile.in
src/rxkad/Makefile.in
src/rxstat/Makefile.in
src/sys/Makefile.in
src/vlserver/Makefile.in
src/volser/Makefile.in

index 24f8f0da81d3c16396c32f704c0bcfd55463cac0..453394f9ebfd51145166a0998ab5b17461f69558 100644 (file)
@@ -21,7 +21,7 @@ LT_objs=audit.lo audit-file.lo audit-sysvmq.lo
 LT_deps = $(top_builddir)/src/rxkad/liboafs_rxkad.la \
          $(top_builddir)/src/util/liboafs_util.la
 
-all: liboafs_audit.la libauthent_audit.la ${TOP_LIBDIR}/libaudit.a ${TOP_INCDIR}/afs/audit.h
+all: liboafs_audit.la libaudit_pic.la ${TOP_LIBDIR}/libaudit.a ${TOP_INCDIR}/afs/audit.h
 
 ${TOP_LIBDIR}/libaudit.a: libaudit.a
        ${INSTALL_DATA} $? $@
@@ -35,7 +35,7 @@ libaudit.a: $(LT_objs)
 liboafs_audit.la: liboafs_audit.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libauthent_audit.la: $(LT_objs)
+libaudit_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 audit.lo: audit.c audit.h audit-api.h
index 3ed23c61008df7c11ffd3fd8d46e4ca768e713dd..06bccaa3e060606b5fcc780a41b35973af6d6353 100644 (file)
@@ -37,7 +37,7 @@ LIBS=libauth.a \
 
 INCLS=cellconfig.h auth.h keys.h internal.h token.h
 
-all: liboafs_auth.la libauthent_auth.la \
+all: liboafs_auth.la libauth_pic.la \
      ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/libauth.krb.a \
      depinstall
 
@@ -101,7 +101,7 @@ libauth.krb.a: $(KRB_objs)
 liboafs_auth.la: liboafs_auth.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libauthent_auth.la: $(LT_objs)
+libauth_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 copyauth: copyauth.o ${LIBS}
index cead25c564b90a17d2eb1e1a61f9916df88849f6..6997c89704680925f00a2ebacbeebd235ebfb479 100644 (file)
@@ -15,7 +15,7 @@ LT_libs = $(LIB_roken) $(MT_LIBS)
 
 all: compile_et ${TOP_INCDIR}/afs/com_err.h ${TOP_INCDIR}/afs/error_table.h \
      ${TOP_INCDIR}/afs/mit-sipb-cr.h ${TOP_LIBDIR}/libafscom_err.a \
-     liboafs_comerr.la libafsrpc_comerr.la
+     liboafs_comerr.la libcomerr_pic.la
 
 buildtools: compile_et
 
@@ -49,7 +49,7 @@ libafscom_err.a: $(LT_objs)
 liboafs_comerr.la: $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libafsrpc_comerr.la: $(LT_objs)
+libcomerr_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 # When we build this file, we're using a .c file that's in the object directory,
index 0e1b49c3c105bc6615513a43da90609f60d5c125..6fce447ad914aad5a06511c35735e6d59b29027d 100644 (file)
@@ -18,7 +18,7 @@ MODULE_INCLUDE=-I${srcdir} -I${TOP_INCDIR}/hcrypto -I$(UPSTREAM)/krb5 -I$(UPSTRE
 
 HEADERS=rfc3961.h krb5_locl.h $(UPSTREAM)/krb5/crypto.h
 
-all:  ${TOP_INCDIR}/afs/rfc3961.h liboafs_rfc3961.la libafsrpc_rfc3961.la \
+all:  ${TOP_INCDIR}/afs/rfc3961.h liboafs_rfc3961.la librfc3961_pic.la \
         ${TOP_LIBDIR}/libafsrfc3961.a
 
 ${TOP_INCDIR}/afs/rfc3961.h: rfc3961.h
@@ -83,7 +83,7 @@ store-int.lo: ${UPSTREAM}/krb5/store-int.c ${HEADERS}
 liboafs_rfc3961.la: liboafs_rfc3961.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs) $(MT_LIBS)
 
-libafsrpc_rfc3961.la: $(LT_objs)
+librfc3961_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs) $(MT_LIBS)
 
 libafsrfc3961.a: $(LT_objs)
index 3532e76ebb08bdc1e659f6c17520957dfd97923b..c4cd13cea5c0967e5069483860d240071f07b3e4 100644 (file)
@@ -24,12 +24,12 @@ all: \
        generated \
        ${TOP_LIBDIR}/libafsint.a \
        liboafs_fsint.la \
-       libafsrpc_fsint.la
+       libfsint_pic.la
 
 liboafs_fsint.la: liboafs_fsint.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libafsrpc_fsint.la: $(LT_objs)
+libfsint_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 libafsint.a: $(LT_objs) afsint.ss.lo afscbint.ss.lo
index f0b5b6d65ff6379176953fb60c2480b045e0065e..e0efbf66d669666341550fb8898e8e6f67e1eaf7 100644 (file)
@@ -69,7 +69,7 @@ KLIBS=${TOP_LIBDIR}/libubik.a \
        ${TOP_LIBDIR}/libafsrfc3961.a \
        ${TOP_LIBDIR}/libafshcrypto_lwp.a
 
-all: liboafs_kauth.la libauthent_kauth.la \
+all: liboafs_kauth.la libkauth_pic.la \
      kaserver kas kpwvalid klog klog.krb knfs kpasswd rebuild kdb ka-forwarder \
        ${TOP_LIBDIR}/libkauth.a \
        ${TOP_LIBDIR}/libkauth.krb.a \
@@ -105,7 +105,7 @@ ${TOP_INCDIR}/afs/kaport.h: kaport.h
 liboafs_kauth.la: liboafs_kauth.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libauthent_kauth.la: $(LT_objs)
+libkauth_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 test tests: all
index 2dbbe36fe95d1c04a266d3065ccaff9831c275e9..5a3ac387498651468918b9ac9dfa3d0376e46a89 100644 (file)
@@ -12,18 +12,18 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 include @TOP_OBJDIR@/src/config/Makefile.libtool
 
 LT_objs = \
-       $(top_builddir)/src/audit/libauthent_audit.la \
-       $(top_builddir)/src/auth/libauthent_auth.la   \
-       $(top_builddir)/src/kauth/libauthent_kauth.la \
+       $(top_builddir)/src/audit/libaudit_pic.la \
+       $(top_builddir)/src/auth/libauth_pic.la   \
+       $(top_builddir)/src/kauth/libkauth_pic.la \
        $(top_builddir)/src/ubik/libauthent_ubik.la \
-       $(top_builddir)/src/sys/libauthent_sys.la \
-       $(top_builddir)/src/ptserver/libauthent_ptserver.la \
-       $(top_builddir)/src/volser/libauthent_volser.la \
-       $(top_builddir)/src/vlserver/libauthent_vlserver.la
+       $(top_builddir)/src/sys/libsys_pic.la \
+       $(top_builddir)/src/ptserver/libprot_pic.la \
+       $(top_builddir)/src/volser/libvolser_pic.la \
+       $(top_builddir)/src/vlserver/libvlserver_pic.la
 
 LT_deps = \
-       $(top_builddir)/src/opr/liboafs_opr.la \
-       $(top_builddir)/src/util/liboafs_util.la \
+       $(top_builddir)/src/opr/libopr_pic.la \
+       $(top_builddir)/src/util/libafsutil_pic.la \
        $(top_builddir)/src/libafsrpc/libafsrpc.la
 
 LT_libs = $(LIB_hcrypto) $(LIB_roken) $(LIB_crypt) $(LIB_AFSDB) $(MT_LIBS)
index 95ad027699c513e5b2f22b1d36ffab8ca93533f5..b4dda3e8e7809c2ffe1627b0f8ef47818149ba18 100644 (file)
@@ -10,18 +10,18 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 include @TOP_OBJDIR@/src/config/Makefile.libtool
 
 LT_objs = \
-       $(top_builddir)/src/fsint/libafsrpc_fsint.la \
-       $(top_builddir)/src/rx/libafsrpc_rx.la \
-       $(top_builddir)/src/rxkad/libafsrpc_rxkad.la \
-       $(top_builddir)/src/crypto/rfc3961/libafsrpc_rfc3961.la \
-       $(top_builddir)/src/comerr/libafsrpc_comerr.la \
+       $(top_builddir)/src/fsint/libfsint_pic.la \
+       $(top_builddir)/src/rx/librx_pic.la \
+       $(top_builddir)/src/rxkad/librxkad_pic.la \
+       $(top_builddir)/src/crypto/rfc3961/librfc3961_pic.la \
+       $(top_builddir)/src/comerr/libcomerr_pic.la \
        $(top_builddir)/src/util/libafsrpc_util.la \
-       $(top_builddir)/src/rxstat/libafsrpc_rxstat.la \
+       $(top_builddir)/src/rxstat/librxstat_pic.la \
        $(top_builddir)/src/sys/libafsrpc_sys.la \
-       $(top_builddir)/src/lwp/libafsrpc_lwpcompat.la
+       $(top_builddir)/src/lwp/liblwpcompat_pic.la
 
 LT_deps = \
-       $(top_builddir)/src/opr/liboafs_opr.la
+       $(top_builddir)/src/opr/libopr_pic.la
 
 LT_libs = $(LIB_hcrypto) $(LIB_roken) $(MT_LIBS)
 
index b6ded9a9a2950907e1d48bce1b7f395e1bef17c9..5b2cbde76b2334494c496655ffd15127c1ab26e2 100644 (file)
@@ -22,7 +22,7 @@ LT_objs = waitkey.lo fasttime.lo lock.lo
 LT_deps = $(top_builddir)/src/opr/liboafs_opr.la
 LT_libs = $(MT_LIBS)
 
-all: liboafs_lwpcompat.la libafsrpc_lwpcompat.la \
+all: liboafs_lwpcompat.la liblwpcompat_pic.la \
        ${TOP_LIBDIR}/liblwp.a depinstall
 
 depinstall: ${TOP_INCDIR}/lock.h ${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/preempt.h ${TOP_INCDIR}/timer.h
@@ -53,7 +53,7 @@ liblwp.a: ${LIBOBJS} $(LT_objs)
 liboafs_lwpcompat.la: liboafs_lwpcompat.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libafsrpc_lwpcompat.la: $(LT_objs)
+liblwpcompat_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 # This is required so sgi_64+ does not try to build this file.
index 86835ed449e3ec9e97a6c5a06f7badda828b0b17..946da08cac5807c46b344826a5a22c79fd0249e8 100644 (file)
@@ -52,7 +52,7 @@ LT_deps = $(top_builddir)/src/opr/liboafs_opr.la \
          $(top_builddir)/src/auth/liboafs_auth.la
 LT_libs =
 
-all: ptserver pts pt_util db_verify liboafs_prot.la libauthent_ptserver.la \
+all: ptserver pts pt_util db_verify liboafs_prot.la libprot_pic.la \
      ${TOP_LIBDIR}/libprot.a depinstall readgroup readpwd testpt ptclient
 
 generated: \
@@ -183,7 +183,7 @@ ptuser.lo: $(LINCLS)
 liboafs_prot.la: liboafs_prot.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libauthent_ptserver.la: $(LT_objs)
+libprot_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 libprot.a: $(LT_objs)
index 13be450bdb2d8587068948030d3882e6a5c44de2..abb54d4877843fc24ee7974c794ad51b84ac97f4 100644 (file)
@@ -26,7 +26,7 @@ all: \
        includes \
        ${TOP_LIBDIR}/librx.a \
        liboafs_rx.la \
-       libafsrpc_rx.la
+       librx_pic.la
 
 depinstall: includes
 
@@ -48,7 +48,7 @@ liboafs_rx.la: liboafs_rx.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
 # Convenience libraries for libafsrpc and shlibafsrpc
-libafsrpc_rx.la: $(LT_objs)
+librx_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 #
index 0c421c28fc9d63d38256e0bd5041b6255b3d6e24..1e2eb805c86fce14f1142bf023d3c07104d98ab5 100644 (file)
@@ -16,7 +16,7 @@ LT_deps =   $(top_builddir)/src/opr/liboafs_opr.la \
 LT_libs =   # gssapi will go here
 
 all: depinstall rxgk_int.cs.c rxgk_int.ss.c rxgk_int.xdr.c rxgk_int.h \
-       ${LT_objs} liboafs_rxgk.la libafsrpc_rxgk.la
+       ${LT_objs} liboafs_rxgk.la librxgk_pic.la
 
 generated: \
        rxgk_errs.h rxgk_errs.c rxgk_int.h rxgk_int.cs.c rxgk_int.xdr.c \
@@ -56,7 +56,7 @@ rxgk_int.xdr.o: rxgk_int.xdr.c rxgk_int.h
 liboafs_rxgk.la: liboafs_rxgk.la.sym ${LT_objs} ${LT_deps}
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libafsrpc_rxgk.la: $(LT_objs)
+librxgk_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 $(LT_objs): $(INCLS)
index af85a1e3efdd9a2b05e1c92776f9432dc8612904..9ecf4e4b28eb78dc4d300385c202eb510fc7ac5b 100644 (file)
@@ -37,7 +37,7 @@ fc_test_LIBS=\
        ${TOP_LIBDIR}/liblwp.a \
        ${TOP_LIBDIR}/libafsutil.a
 
-all: ${TOP_LIBDIR}/librxkad.a liboafs_rxkad.la libafsrpc_rxkad.la depinstall
+all: ${TOP_LIBDIR}/librxkad.a liboafs_rxkad.la librxkad_pic.la depinstall
 
 test: fc_test
 
@@ -78,7 +78,7 @@ librxkad.a: $(LT_objs)
 liboafs_rxkad.la: liboafs_rxkad.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libafsrpc_rxkad.la: $(LT_objs)
+librxkad_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 CFLAGS_ticket5.lo = @CFLAGS_NOERROR@
index a84e7ce5b1138c2e90f9093f35bb35db1684d38b..97c9bf14dd05c3d5d94810e445ffd8e589a79b0f 100644 (file)
@@ -13,7 +13,7 @@ include @TOP_OBJDIR@/src/config/Makefile.lwptool
 LT_objs = rxstat.cs.lo rxstat.ss.lo rxstat.xdr.lo rxstat.lo
 LT_deps = $(top_builddir)/src/rx/liboafs_rx.la
 
-all: depinstall liboafs_rxstat.la libafsrpc_rxstat.la \
+all: depinstall liboafs_rxstat.la librxstat_pic.la \
        ${TOP_LIBDIR}/librxstat.a
 
 generated: \
@@ -55,7 +55,7 @@ librxstat.a: $(LT_objs)
 liboafs_rxstat.la: liboafs_rxstat.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libafsrpc_rxstat.la: $(LT_objs)
+librxstat_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 Krxstat.cs.c: rxstat.xg
index 4eeb6c791727585a6c9f336e23d507a9a9d9a430..c3c57f15f397b42dcb850d954dc49fbf02402e2c 100644 (file)
@@ -30,7 +30,7 @@ LT_deps = $(top_builddir)/src/rx/liboafs_rx.la
 all: \
     liboafs_sys.la \
     libafsrpc_sys.la \
-    libauthent_sys.la \
+    libsys_pic.la \
     rmtsysd \
     ${TOP_INCDIR}/afs/afssyscalls.h \
     ${TOP_INCDIR}/afs/afs.exp \
@@ -116,7 +116,7 @@ liboafs_sys.la: liboafs_sys.la.sym $(LT_objs) $(LT_deps) afsl.exp
 libafsrpc_sys.la: syscall.lo
        $(LT_LDLIB_pic) syscall.lo
 
-libauthent_sys.la: $(LT_objs)
+libsys_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 tests: fixit iinc idec icreate iopen istat rmtsysd
index 91baeb9955abdea1547b81b522d07a8f6216c337..8a09bc50d5e8e84d2dc14b71124fde2a680b22dc 100644 (file)
@@ -47,7 +47,7 @@ LT_deps = $(top_builddir)/src/opr/liboafs_opr.la \
 all: \
        vlserver vlclient cnvldb vlserver cnvldb vldb_check \
        Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \
-       liboafs_vldb.la libauthent_vlserver.la \
+       liboafs_vldb.la libvlserver_pic.la \
        ${TOP_LIBDIR}/libvldb.a depinstall
 
 generated: \
@@ -133,7 +133,7 @@ libvldb.a: $(LT_objs)
 liboafs_vldb.la: liboafs_vldb.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libauthent_vlserver.la: $(LT_objs)
+libvlserver_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 vlclient: vlclient.o libvldb.a $(LIBS)
index 16e900e5fb26d8d6dc4888fde975d7a28196a383..7e9cc78af69657b8c6fd28c0b63112cf5d97361a 100644 (file)
@@ -74,7 +74,7 @@ LT_deps = $(top_builddir)/src/opr/liboafs_opr.la \
 
 all: volserver vos restorevol voldump \
        liboafs_volser.la \
-       libauthent_volser.la \
+       libvolser_pic.la \
        ${TOP_INCDIR}/afs/volser.h \
        ${TOP_INCDIR}/afs/vsutils_prototypes.h \
        ${TOP_INCDIR}/afs/volser_prototypes.h \
@@ -122,7 +122,7 @@ libvolser.a: $(LT_objs)
 liboafs_volser.la: liboafs_volser.la.sym $(LT_objs) $(LT_deps)
        $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
 
-libauthent_volser.la: $(LT_objs)
+libvolser_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
 volerr.c: volerr.et