From 29551cacca6df9cd8bcf7223ae4383a27fd23557 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 4 Sep 2008 22:36:52 -0400 Subject: Fix e2initrd_helper, blkid, and fsck from linking with unneeded libraries ... especially when using ELF shared libraries. We only need to link with a library if the executable uses that library directly. Signed-off-by: "Theodore Ts'o" --- misc/Makefile.in | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'misc/Makefile.in') diff --git a/misc/Makefile.in b/misc/Makefile.in index c208571d..ccbf8a01 100644 --- a/misc/Makefile.in +++ b/misc/Makefile.in @@ -61,9 +61,6 @@ DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) -LIBS_BLKID= $(LIBBLKID) $(LIBUUID) $(LIBEXT2FS) -DEPLIBS_BLKID= $(DEPLIBBLKID) $(DEPLIBUUID) $(LIBEXT2FS) - LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR) DEPLIBS_E2P= $(LIBE2P) $(LIBCOM_ERR) @@ -96,15 +93,16 @@ partinfo: partinfo.o @echo " LD $@" @$(CC) $(ALL_LDFLAGS) -o partinfo partinfo.o -e2initrd_helper: e2initrd_helper.o $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBS_BLKID) +e2initrd_helper: e2initrd_helper.o $(DEPLIBS) $(DEPLIBBLKID) $(LIBEXT2FS) @echo " LD $@" @$(CC) $(ALL_LDFLAGS) -o e2initrd_helper e2initrd_helper.o $(LIBS) \ - $(LIBS_BLKID) $(LIBS_E2P) $(LIBINTL) + $(LIBBLKID) $(LIBEXT2FS) $(LIBINTL) -tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBS_BLKID) +tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBBLKID) \ + $(DEPLIBUUID) $(LIBEXT2FS) @echo " LD $@" @$(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS) \ - $(LIBS_BLKID) $(LIBS_E2P) $(LIBINTL) + $(LIBBLKID) $(LIBUUID) $(LIBEXT2FS) $(LIBS_E2P) $(LIBINTL) tune2fs.static: $(TUNE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBBLKID) @echo " LD $@" @@ -112,9 +110,10 @@ tune2fs.static: $(TUNE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_L $(STATIC_LIBS) $(STATIC_LIBBLKID) $(STATIC_LIBUUID) \ $(STATIC_LIBE2P) $(LIBINTL) -blkid: $(BLKID_OBJS) $(DEPLIBS_BLKID) +blkid: $(BLKID_OBJS) $(DEPLIBBLKID) $(LIBEXT2FS) @echo " LD $@" - @$(CC) $(ALL_LDFLAGS) -o blkid $(BLKID_OBJS) $(LIBS_BLKID) $(LIBINTL) + @$(CC) $(ALL_LDFLAGS) -o blkid $(BLKID_OBJS) $(LIBBLKID) $(LIBINTL) \ + $(LIBEXT2FS) e2image: $(E2IMAGE_OBJS) $(DEPLIBS) @echo " LD $@" @@ -137,10 +136,11 @@ mklost+found: $(MKLPF_OBJS) @echo " LD $@" @$(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) $(LIBINTL) -mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBUUID) $(DEPLIBS_BLKID) +mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBBLKID) $(DEPLIBUUID) \ + $(LIBEXT2FS) @echo " LD $@" - @$(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBS_BLKID) \ - $(LIBE2P) $(LIBUUID) $(LIBINTL) + @$(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBBLKID) \ + $(LIBUUID) $(LIBEXT2FS) $(LIBE2P) $(LIBINTL) mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBUUID) $(DEPSTATIC_LIBBLKID) @echo " LD $@" @@ -169,9 +169,9 @@ dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBUUID) @$(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS) \ $(LIBS_E2P) $(LIBUUID) $(LIBINTL) -fsck: $(FSCK_OBJS) $(DEBLIBS_BLKID) +fsck: $(FSCK_OBJS) $(DEPLIBBLKID) @echo " LD $@" - @$(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBS_BLKID) $(LIBINTL) + @$(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) $(LIBINTL) badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS) @echo " LD $@" -- cgit v1.2.3