aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/mtd
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-10-27 22:32:59 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2019-11-08 23:57:52 +0100
commit1eb34b7287ed97ad1e2ae60a436babbb5c68076f (patch)
treea16823caa93ce6d2dfba6f4ec81ab829c8375fcc /package/system/mtd
parent6596c95eca50ccdb3fa8098312b82cef59e40434 (diff)
downloadupstream-1eb34b7287ed97ad1e2ae60a436babbb5c68076f.tar.gz
upstream-1eb34b7287ed97ad1e2ae60a436babbb5c68076f.tar.bz2
upstream-1eb34b7287ed97ad1e2ae60a436babbb5c68076f.zip
mtd: Activate LTO compile option
This decreases the size of the mtd application by 25% on MIPS BE. old: 20,597 /sbin/mtd new: 16,421 /sbin/mtd Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/system/mtd')
-rw-r--r--package/system/mtd/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/system/mtd/Makefile b/package/system/mtd/Makefile
index 2347b8b723..166bb33281 100644
--- a/package/system/mtd/Makefile
+++ b/package/system/mtd/Makefile
@@ -36,7 +36,8 @@ endef
target=$(firstword $(subst -, ,$(BOARD)))
MAKE_FLAGS += TARGET="$(target)"
-TARGET_CFLAGS := $(TARGET_CFLAGS) -Dtarget_$(target)=1 -Wall
+TARGET_CFLAGS += -Dtarget_$(target)=1 -Wall -flto
+TARGET_LDFLAGS += -flto=jobserver
ifdef CONFIG_MTD_REDBOOT_PARTS
MAKE_FLAGS += FIS_SUPPORT=1