aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-03-30 15:32:07 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2018-04-28 15:29:22 +0200
commit3e93df07071e79bb8cf1d8fb7fd1539c87bdc3a4 (patch)
tree85475917fd982329313f2e163cc636f42b6627c0
parentf37f63f38ccb706b196fe4934d0d9d92537eb832 (diff)
downloadupstream-3e93df07071e79bb8cf1d8fb7fd1539c87bdc3a4.tar.gz
upstream-3e93df07071e79bb8cf1d8fb7fd1539c87bdc3a4.tar.bz2
upstream-3e93df07071e79bb8cf1d8fb7fd1539c87bdc3a4.zip
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 <hauke@hauke-m.de> Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
-rw-r--r--package/utils/mtd-utils/Makefile3
1 files changed, 3 insertions, 0 deletions
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) \