From 07940acc341ee9bb2887359f193625e48f36207e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 11 Jul 2018 18:55:02 +0200 Subject: [PATCH] netifd: compile with LTO enabled Reduces .ipk size from 65k to 63k on MIPS Signed-off-by: Felix Fietkau --- package/network/config/netifd/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index c18496c9233..2eaf38d5803 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 \ -- 2.30.2