From af6591622696bcb4e46702da07923e909db99f30 Mon Sep 17 00:00:00 2001 From: Arvind Sankar Date: Sun, 5 Jul 2020 22:58:59 -0400 Subject: Add -z defs to LDFLAGS This will make sure the installed libraries are linked with everything they require. Reviewed-by: Brian Behlendorf Signed-off-by: Arvind Sankar Closes #10538 --- lib/libnvpair/Makefile.am | 6 ++++-- lib/libuutil/Makefile.am | 2 +- lib/libzfs/Makefile.am | 2 +- lib/libzfs_core/Makefile.am | 2 +- lib/libzpool/Makefile.am | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/libnvpair/Makefile.am b/lib/libnvpair/Makefile.am index 181bde9b2..8d736f7b7 100644 --- a/lib/libnvpair/Makefile.am +++ b/lib/libnvpair/Makefile.am @@ -31,8 +31,10 @@ libnvpair_la_LIBADD = \ libnvpair_la_LIBADD += $(LIBTIRPC_LIBS) $(LTLIBINTL) +libnvpair_la_LDFLAGS = -Wl,-z,defs + if BUILD_FREEBSD -libnvpair_la_LDFLAGS = -version-info 3:0:0 +libnvpair_la_LDFLAGS += -version-info 3:0:0 else -libnvpair_la_LDFLAGS = -version-info 1:1:0 +libnvpair_la_LDFLAGS += -version-info 1:1:0 endif diff --git a/lib/libuutil/Makefile.am b/lib/libuutil/Makefile.am index fd217ff8f..099446ca2 100644 --- a/lib/libuutil/Makefile.am +++ b/lib/libuutil/Makefile.am @@ -21,7 +21,7 @@ libuutil_la_LIBADD = \ libuutil_la_LIBADD += $(LTLIBINTL) -libuutil_la_LDFLAGS = -pthread +libuutil_la_LDFLAGS = -pthread -Wl,-z,defs if BUILD_FREEBSD libuutil_la_LDFLAGS += -version-info 3:0:0 diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am index 7e07bf1e3..5a421409c 100644 --- a/lib/libzfs/Makefile.am +++ b/lib/libzfs/Makefile.am @@ -83,7 +83,7 @@ libzfs_la_LIBADD += \ libzfs_la_LIBADD += -lm $(LIBCRYPTO_LIBS) $(ZLIB_LIBS) $(LTLIBINTL) -libzfs_la_LDFLAGS = -pthread +libzfs_la_LDFLAGS = -pthread -Wl,-z,defs if BUILD_FREEBSD libzfs_la_LIBADD += -lutil -lgeom diff --git a/lib/libzfs_core/Makefile.am b/lib/libzfs_core/Makefile.am index 39731f312..75b46acde 100644 --- a/lib/libzfs_core/Makefile.am +++ b/lib/libzfs_core/Makefile.am @@ -15,7 +15,7 @@ libzfs_core_la_LIBADD = \ libzfs_core_la_LIBADD += $(LTLIBINTL) -libzfs_core_la_LDFLAGS = -pthread +libzfs_core_la_LDFLAGS = -pthread -Wl,-z,defs if BUILD_FREEBSD libzfs_core_la_LIBADD += -lutil -lgeom diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am index bce45acc2..6cbab8fee 100644 --- a/lib/libzpool/Makefile.am +++ b/lib/libzpool/Makefile.am @@ -207,7 +207,7 @@ libzpool_la_LIBADD = \ libzpool_la_LIBADD += $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -ldl -libzpool_la_LDFLAGS = -pthread +libzpool_la_LDFLAGS = -pthread -Wl,-z,defs if BUILD_FREEBSD libzpool_la_LIBADD += -lgeom -- cgit v1.2.3