From: Hauke Mehrtens Date: Fri, 30 Mar 2018 13:32:07 +0000 (+0200) Subject: mtd-utils: activate --gc-sections X-Git-Tag: v18.06.0-rc1~311 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3e93df07071e79bb8cf1d8fb7fd1539c87bdc3a4;p=oweals%2Fopenwrt.git 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 Tested-by: Koen Vandeputte --- diff --git a/package/utils/mtd-utils/Makefile b/package/utils/mtd-utils/Makefile index 2ce7d671fe..ca60726d81 100644 --- a/package/utils/mtd-utils/Makefile +++ b/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) \