Patchwork punt redundant libcrc32

login
register
mail settings
Submitter Mike Frysinger
Date June 25, 2011, 4:57 a.m.
Message ID <1308977857-3220-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/101935/
State Accepted, archived
Commit 5319b84974fcb71504aed2d1b8285e9c0a4a4bb8
Headers show

Comments

Mike Frysinger - June 25, 2011, 4:57 a.m.
The libcrc32.a is only used in one place: mkfs.ubifs.  But this also
uses libmtd.a, and the only file in libcrc32.a is also in libmtd.a.
So libcrc32.a itself is completely redundant.  Punt!

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 lib/Makefile        |    5 ++---
 mkfs.ubifs/Makefile |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
Artem Bityutskiy - June 25, 2011, 6:12 a.m.
On Sat, 2011-06-25 at 00:57 -0400, Mike Frysinger wrote:
> The libcrc32.a is only used in one place: mkfs.ubifs.  But this also
> uses libmtd.a, and the only file in libcrc32.a is also in libmtd.a.
> So libcrc32.a itself is completely redundant.  Punt!
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Pushed, thank you!

Patch

diff --git a/lib/Makefile b/lib/Makefile
index 9de6a7d..9b01d32 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -6,12 +6,11 @@  SUBDIRS =
 
 # CFLAGS += -Werror
 CPPFLAGS += -I../include
-LIBS = libmtd libcrc32
-TARGETS = libmtd.a libcrc32.a
+LIBS = libmtd
+TARGETS = libmtd.a
 
 include ../common.mk
 
-$(BUILDDIR)/libcrc32.a: $(addprefix $(BUILDDIR)/, libcrc32.o)
 $(BUILDDIR)/libmtd.a: $(addprefix $(BUILDDIR)/,\
        libmtd.o libmtd_legacy.o libcrc32.o libfec.o)
 
diff --git a/mkfs.ubifs/Makefile b/mkfs.ubifs/Makefile
index 499f9e5..ba21a8c 100644
--- a/mkfs.ubifs/Makefile
+++ b/mkfs.ubifs/Makefile
@@ -7,7 +7,7 @@  ALL_SOURCES=*.[ch] hashtable/*.[ch]
 TARGETS = mkfs.ubifs
 
 LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L$(BUILDDIR)/../ubi-utils/ -lubi
-LDLIBS_mkfs.ubifs += -L$(BUILDDIR)/../lib -lmtd -lcrc32
+LDLIBS_mkfs.ubifs += -L$(BUILDDIR)/../lib -lmtd
 LDLIBS_mkfs.ubifs += $(ZLIBLDFLAGS) $(LZOLDFLAGS)
 
 include ../common.mk