From: Felix Fietkau Date: Wed, 11 Jul 2018 16:55:02 +0000 (+0200) Subject: netifd: compile with LTO enabled X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=549690f32b4b2718a737142bc4d276ab2e10a30f;p=openwrt%2Fstaging%2Fjow.git netifd: compile with LTO enabled Reduces .ipk size from 65k to 63k on MIPS Signed-off-by: Felix Fietkau (backported from 07940acc341ee9bb2887359f193625e48f36207e) --- diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 1cae3ea15e..2f5b96c6f0 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -27,7 +27,10 @@ endef TARGET_CFLAGS += \ -I$(STAGING_DIR)/usr/include/libnl-tiny \ - -I$(STAGING_DIR)/usr/include + -I$(STAGING_DIR)/usr/include \ + -flto + +TARGET_LDFLAGS += -flto -fuse-linker-plugin CMAKE_OPTIONS += \ -DLIBNL_LIBS=-lnl-tiny \