Browse Source

mtd-utils: activate --gc-sections

This reduces the size of the binary a bit:

old:
 37556 bin/targets/lantiq/xrx200/packages/nand-utils_2.0.1-1_mips_24kc.ipk
 81697 bin/targets/lantiq/xrx200/packages/ubi-utils_2.0.1-1_mips_24kc.ipk

new:
 27450 bin/targets/lantiq/xrx200/packages/nand-utils_2.0.1-1_mips_24kc.ipk
 71796 bin/targets/lantiq/xrx200/packages/ubi-utils_2.0.1-1_mips_24kc.ipk

Signed-off-by: Hauke Mehrtens <[email protected]>
Tested-by: Koen Vandeputte <[email protected]>
Hauke Mehrtens 7 years ago
parent
commit
3e93df0707
1 changed files with 3 additions and 0 deletions
  1. 3 0
      package/utils/mtd-utils/Makefile

+ 3 - 0
package/utils/mtd-utils/Makefile

@@ -61,6 +61,9 @@ CONFIGURE_ARGS += \
 	--without-xattr \
 	--without-lzo
 
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections
+
 define Package/ubi-utils/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) \