@@ -6,6 +6,8 @@ ChangeLog
Doxygen/
.*.swp
*.o
+*.lo
+*.la
src/fedfsd/fedfsd
src/resolve-junction/resolve-junction
src/nsdbparams/nsdbparams
@@ -64,4 +66,5 @@ libtool
stamp-h1
depcomp
.deps/
+.libs/
.stgit*
@@ -32,16 +32,15 @@ sbin_PROGRAMS = fedfs-null \
fedfs-lookup-replication
LDADD = $(LIBTIRPC) $(LIBLDAP) $(LIBLBER) \
$(LIBSQLITE3) $(LIBIDN) $(LIBUUID) \
- $(top_builddir)/src/libadmin/libadmin.a \
- $(top_builddir)/src/libjunction/libjunction.a \
- $(top_builddir)/src/libnsdb/libnsdb.a \
- $(top_builddir)/src/libxlog/libxlog.a
+ $(top_builddir)/src/libadmin/libadmin.la \
+ $(top_builddir)/src/libjunction/libjunction.la \
+ $(top_builddir)/src/libnsdb/libnsdb.la \
+ $(top_builddir)/src/libxlog/libxlog.la
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIE \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include -I/usr/include/tirpc
-AM_LDFLAGS = -fPIC
@@ -29,19 +29,18 @@ sbin_PROGRAMS = fedfsd
fedfsd_SOURCES = listen.c main.c privilege.c svc.c
fedfsd_LDADD = $(LIBTIRPC) $(LIBLDAP) $(LIBLBER) \
$(LIBSQLITE3) $(LIBIDN) $(LIBUUID) $(LIBCAP) \
- $(top_builddir)/src/libadmin/libadmin.a \
- $(top_builddir)/src/libnsdb/libnsdb.a \
- $(top_builddir)/src/libjunction/libjunction.a \
- $(top_builddir)/src/libxlog/libxlog.a
+ $(top_builddir)/src/libadmin/libadmin.la \
+ $(top_builddir)/src/libnsdb/libnsdb.la \
+ $(top_builddir)/src/libjunction/libjunction.la \
+ $(top_builddir)/src/libxlog/libxlog.la
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIE \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include -I/usr/include/tirpc
-AM_LDFLAGS = -fPIC
#######################################################################
# The following allows the current practice of having
@@ -23,12 +23,12 @@
## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
##
-noinst_LIBRARIES = libadmin.a
-libadmin_a_SOURCES = fedfs_admin_clnt.c fedfs_admin_svc.c fedfs_admin_xdr.c
+noinst_LTLIBRARIES = libadmin.la
+libadmin_la_SOURCES = fedfs_admin_clnt.c fedfs_admin_svc.c fedfs_admin_xdr.c
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
# Squelch compiler warnings for rpcgen-produced source code
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIC
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include -I/usr/include/tirpc
@@ -23,13 +23,13 @@
## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
##
-noinst_LIBRARIES = libjunction.a
-libjunction_a_SOURCES = junction.c
+noinst_LTLIBRARIES = libjunction.la
+libjunction_la_SOURCES = junction.c
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIC \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include
@@ -24,14 +24,15 @@
##
noinst_HEADERS = nsdb-internal.h
-noinst_LIBRARIES = libnsdb.a
-libnsdb_a_SOURCES = administrator.c annotation.c display.c fileserver.c \
+
+noinst_LTLIBRARIES = libnsdb.la
+libnsdb_la_SOURCES = administrator.c annotation.c display.c fileserver.c \
ldap.c nsdb.c path.c sqlite.c
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIC \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include
@@ -23,13 +23,13 @@
## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
##
-noinst_LIBRARIES = libparser.a
-libparser_a_SOURCES = parse_opt.c token.c
+noinst_LTLIBRARIES = libparser.la
+libparser_la_SOURCES = parse_opt.c token.c
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIC \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include
@@ -23,13 +23,13 @@
## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
##
-noinst_LIBRARIES = libsi.a
-libsi_a_SOURCES = getsrvinfo.c
+noinst_LTLIBRARIES = libsi.la
+libsi_la_SOURCES = getsrvinfo.c
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIC \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include
@@ -23,13 +23,13 @@
## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
##
-noinst_LIBRARIES = libxlog.a
-libxlog_a_SOURCES = xlog.c
+noinst_LTLIBRARIES = libxlog.la
+libxlog_la_SOURCES = xlog.c
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIC \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I $(top_srcdir)/src/include
@@ -28,17 +28,16 @@ root_sbin_PROGRAMS = mount.fedfs
sbin_PROGRAMS = fedfs-map-nfs4
fedfs_map_nfs4_SOURCES = fedfs-map-nfs4.c
fedfs_map_nfs4_LDADD = $(LIBRESOLV) \
- $(top_builddir)/src/libsi/libsi.a
+ $(top_builddir)/src/libsi/libsi.la
mount_fedfs_SOURCES = main.c
# mount.fedfs must never link against libraries in /usr
mount_fedfs_LDADD = $(LIBRESOLV) \
- $(top_builddir)/src/libsi/libsi.a
+ $(top_builddir)/src/libsi/libsi.la
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIE \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include
-AM_LDFLAGS = -fPIC
@@ -30,15 +30,14 @@ sbin_PROGRAMS = nsdb-annotate nsdb-describe nsdb-list \
nsdb-create-fsl nsdb-delete-fsl nsdb-update-fsl
LDADD = $(LIBLDAP) $(LIBLBER) \
$(LIBSQLITE3) $(LIBIDN) $(LIBUUID) \
- $(top_builddir)/src/libnsdb/libnsdb.a \
- $(top_builddir)/src/libxlog/libxlog.a \
- $(top_builddir)/src/libjunction/libjunction.a
+ $(top_builddir)/src/libnsdb/libnsdb.la \
+ $(top_builddir)/src/libxlog/libxlog.la \
+ $(top_builddir)/src/libjunction/libjunction.la
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIE \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I$(top_srcdir)/src/include -I/usr/include/tirpc
-AM_LDFLAGS = -fPIC
@@ -28,15 +28,14 @@ sbin_PROGRAMS = nsdbparams
nsdbparams_SOURCES = delete.c list.c main.c show.c update.c
LDADD = $(LIBLDAP) $(LIBLBER) \
$(LIBSQLITE3) $(LIBIDN) $(LIBUUID) $(LIBCAP) \
- $(top_builddir)/src/libnsdb/libnsdb.a \
- $(top_builddir)/src/libjunction/libjunction.a \
- $(top_builddir)/src/libxlog/libxlog.a
+ $(top_builddir)/src/libnsdb/libnsdb.la \
+ $(top_builddir)/src/libjunction/libjunction.la \
+ $(top_builddir)/src/libxlog/libxlog.la
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIE \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include -I/usr/include/tirpc
-AM_LDFLAGS = -fPIC
@@ -29,16 +29,15 @@ sbin_PROGRAMS = resolve-junction
resolve_junction_SOURCES = main.c privilege.c privilege.h
LDADD = $(LIBLDAP) $(LIBLBER) \
$(LIBSQLITE3) $(LIBIDN) $(LIBUUID) $(LIBCAP) \
- $(top_builddir)/src/libadmin/libadmin.a \
- $(top_builddir)/src/libnsdb/libnsdb.a \
- $(top_builddir)/src/libjunction/libjunction.a \
- $(top_builddir)/src/libxlog/libxlog.a
+ $(top_builddir)/src/libadmin/libadmin.la \
+ $(top_builddir)/src/libnsdb/libnsdb.la \
+ $(top_builddir)/src/libjunction/libjunction.la \
+ $(top_builddir)/src/libxlog/libxlog.la
CLEANFILES = cscope.in.out cscope.out cscope.po.out *~
DISTCLEANFILES = Makefile.in
-AM_CFLAGS = -ggdb -fstrict-aliasing -fpie -Wall -Wextra \
- -pedantic -Wformat=2 -Wstrict-aliasing=2 \
- -Wp,-D_FORTIFY_SOURCE=2
+AM_CFLAGS = -ggdb -fstrict-aliasing -fPIE \
+ -Wall -Wextra -pedantic -Wformat=2 \
+ -Wstrict-aliasing=2 -Wp,-D_FORTIFY_SOURCE=2
AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include -I/usr/include/tirpc
-AM_LDFLAGS = -fPIC
The new junction plug-ins will be shared libraries. You can't build a shared library from static libraries, so all of the libraries we have in fedfs-utils need to be converted to shared libraries. The use of "-fPIC" as a flag on $(LD) is incorrect, so I moved it to $(CFLAGS) where needed. "-fPIE" is appropriate for finished executables. As a final touch I converted all of the existing commands to grab the shared version instead of the static version of each library. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- .gitignore | 3 +++ src/fedfsc/Makefile.am | 15 +++++++-------- src/fedfsd/Makefile.am | 15 +++++++-------- src/libadmin/Makefile.am | 6 +++--- src/libjunction/Makefile.am | 10 +++++----- src/libnsdb/Makefile.am | 11 ++++++----- src/libparser/Makefile.am | 10 +++++----- src/libsi/Makefile.am | 10 +++++----- src/libxlog/Makefile.am | 10 +++++----- src/mount/Makefile.am | 11 +++++------ src/nsdbc/Makefile.am | 13 ++++++------- src/nsdbparams/Makefile.am | 13 ++++++------- src/resolve-junction/Makefile.am | 15 +++++++-------- 13 files changed, 70 insertions(+), 72 deletions(-)