From e69bd526c164fa0313eb3b620d77fa6c128b5850 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 16 Aug 2010 16:24:36 -0700 Subject: [PATCH] Make interlibrary dependencies explicit Under the latest Gentoo (2.6.34-gentoo-r2) the interlibrary dependencies must be made explicit. This is likely due to the --as-needed linker option which is commonly used under Gentoo. This option requires that the linker only include the minimum set of symbols required by the binary. Without the full dependency tree the linker would need to bring in all the symbols from dependent libraries. Signed-off-by: Brian Behlendorf --- lib/libuutil/Makefile.am | 2 ++ lib/libzfs/Makefile.am | 6 ++++++ lib/libzpool/Makefile.am | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/lib/libuutil/Makefile.am b/lib/libuutil/Makefile.am index 591c046e3b..474810aed5 100644 --- a/lib/libuutil/Makefile.am +++ b/lib/libuutil/Makefile.am @@ -9,6 +9,8 @@ DEFAULT_INCLUDES += \ lib_LTLIBRARIES = libuutil.la +libuutil_la_LIBADD = ${top_srcdir}/lib/libavl/libavl.la + libuutil_la_SOURCES = \ ${top_srcdir}/lib/libuutil/uu_alloc.c \ ${top_srcdir}/lib/libuutil/uu_avl.c \ diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am index 24ade074ee..b1272e9af2 100644 --- a/lib/libzfs/Makefile.am +++ b/lib/libzfs/Makefile.am @@ -16,6 +16,12 @@ DEFAULT_INCLUDES += \ lib_LTLIBRARIES = libzfs.la +libzfs_la_LDFLAGS = -lm + +libzfs_la_LIBADD = \ + ${top_srcdir}/lib/libefi/libefi.la \ + ${top_srcdir}/lib/libuutil/libuutil.la + libzfs_la_SOURCES = \ ${top_srcdir}/lib/libzfs/libzfs_changelist.c \ ${top_srcdir}/lib/libzfs/libzfs_config.c \ diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am index 8a7fb195f9..eee61e9953 100644 --- a/lib/libzpool/Makefile.am +++ b/lib/libzpool/Makefile.am @@ -15,6 +15,11 @@ DEFAULT_INCLUDES += \ lib_LTLIBRARIES = libzpool.la +libzpool_la_LIBADD = \ + ${top_srcdir}/lib/libunicode/libunicode.la \ + ${top_srcdir}/lib/libavl/libavl.la \ + ${top_srcdir}/lib/libspl/libspl.la + libzpool_la_SOURCES = \ ${top_srcdir}/lib/libzpool/kernel.c \ ${top_srcdir}/lib/libzpool/taskq.c \