mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
31fc19399e
Libraries that depend on other libraries should list them in ELF's DT_NEEDED field so that programs linking to them do not need to specify those libraries unless they depend on them as well. This is not the case in the current code and the consequence is that anything that needs a library must know its dependencies. This is fragile and caused GRUB2's configure script to break when a dependency was added on libblkid in libzfs. This resolves that problem by using LIBADD/LDADD to specify libraries in Makefile.am instead of LDFLAGS. This ensures that proper DT_NEEDED entries are generated and prevents GRUB2's configure script from breaking in the presence of a libblkid dependency. This also removes unneeded dependencies from various files. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #1751
34 lines
989 B
Makefile
34 lines
989 B
Makefile
include $(top_srcdir)/config/Rules.am
|
|
|
|
AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN)
|
|
|
|
SUBDIRS = include $(TARGET_ASM_DIR)
|
|
DIST_SUBDIRS = include asm-generic asm-i386 asm-x86_64
|
|
|
|
DEFAULT_INCLUDES += \
|
|
-I$(top_srcdir)/lib/libspl/include
|
|
|
|
AM_CCASFLAGS = \
|
|
-I$(top_srcdir)/lib/libspl/include
|
|
|
|
noinst_LTLIBRARIES = libspl.la
|
|
|
|
libspl_la_SOURCES = \
|
|
$(top_srcdir)/lib/libspl/getexecname.c \
|
|
$(top_srcdir)/lib/libspl/gethrtime.c \
|
|
$(top_srcdir)/lib/libspl/gethrestime.c \
|
|
$(top_srcdir)/lib/libspl/getmntany.c \
|
|
$(top_srcdir)/lib/libspl/list.c \
|
|
$(top_srcdir)/lib/libspl/mkdirp.c \
|
|
$(top_srcdir)/lib/libspl/strlcat.c \
|
|
$(top_srcdir)/lib/libspl/strlcpy.c \
|
|
$(top_srcdir)/lib/libspl/strnlen.c \
|
|
$(top_srcdir)/lib/libspl/timestamp.c \
|
|
$(top_srcdir)/lib/libspl/zone.c \
|
|
$(top_srcdir)/lib/libspl/xdr.c \
|
|
$(top_srcdir)/lib/libspl/$(TARGET_ASM_DIR)/atomic.S \
|
|
$(top_srcdir)/lib/libspl/include/sys/list.h \
|
|
$(top_srcdir)/lib/libspl/include/sys/list_impl.h
|
|
|
|
libspl_la_LIBADD = -lrt
|