netifd: compile with LTO enabled
authorFelix Fietkau <nbd@nbd.name>
Wed, 11 Jul 2018 16:55:02 +0000 (18:55 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:32:20 +0000 (17:32 +0100)
Reduces .ipk size from 65k to 63k on MIPS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 07940acc341ee9bb2887359f193625e48f36207e)

package/network/config/netifd/Makefile

index 1cae3ea15e790ea722f1feb67b14806717b08403..2f5b96c6f0549d1fd5efbc682a9c216752dc2c8a 100644 (file)
@@ -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 \