mtd: Activate LTO compile option
[openwrt/staging/wigyori.git] / package / system / mtd / Makefile
index 2347b8b7232b5dac4acba7b45a7917be43027048..166bb33281d77683e4861ef27064d65e0b918fd7 100644 (file)
@@ -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