Repository : ssh://git@open-mesh.org/openwrt-feed-alfred
On branch : master
commit fa23641116bd9644a466d5c534d6892e59211ac7 Author: Sven Eckelmann sven@narfation.org Date: Tue May 7 14:51:05 2013 +0200
alfred: Use section garbage collection to reduce binary size
The linker can identify unused sections of a binary when each symbol is stored in a separate section. This mostly removes the unused debugfs function and reduces the size by ~5% on mipsel.
Signed-off-by: Sven Eckelmann sven@narfation.org
fa23641116bd9644a466d5c534d6892e59211ac7 alfred/Makefile | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/alfred/Makefile b/alfred/Makefile index 4578c3b..ab19325 100644 --- a/alfred/Makefile +++ b/alfred/Makefile @@ -44,6 +44,9 @@ endef MAKE_ALFRED_FLAGS=\ CONFIG_ALFRED_VIS=$(if $(CONFIG_PACKAGE_ALFRED_VIS),y,n)
+TARGET_CFLAGS += -ffunction-sections -fdata-sections +TARGET_LDFLAGS += -Wl,--gc-sections + define Build/Compile CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \