[RFC][patch] slight generic size reduction
Bernhard Fischer
rep.nop at aon.at
Thu Mar 30 03:13:33 PST 2006
Hi,
Do we want that one? It saves 114 bytes "for free"..
Alternatively, one could look at ar to do a better layout on behalf of
us, it seems.
me at there:/tmp$ svn diff busybox/Rules.mak
Index: busybox/Rules.mak
===================================================================
--- busybox/Rules.mak (revision 14700)
+++ busybox/Rules.mak (working copy)
@@ -302,7 +302,7 @@
cmd_compile.h = $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
cmd_strip = $(STRIPCMD) $@
cmd_link = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS)
-cmd_ar = $(AR) $(ARFLAGS) $@ $^
+cmd_ar = $(AR) $(ARFLAGS) $@ $(shell ls -r -S $^)
compile.c = @$(disp_compile.c) ; $(cmd_compile.c)
compile.h = @$(disp_compile.h) ; $(cmd_compile.h)
do_strip = @$(disp_strip) ; $(cmd_strip)
me at there:/tmp$ for i in .oorig '';do cd busybox$i;make defconfig ; make;cd
-;done 2>1 >& /dev/zero;size busybox.oorig/busybox busybox/busybox
text data bss dec hex filename
916655 11264 1039172 1967091 1e03f3 busybox.oorig/busybox
916689 11256 1039032 1966977 1e0381 busybox/busybox
More information about the busybox
mailing list