netifd: compile with LTO enabled
authorFelix Fietkau <nbd@nbd.name>
Wed, 11 Jul 2018 16:55:02 +0000 (18:55 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 13 Jul 2018 15:22:53 +0000 (17:22 +0200)
Reduces .ipk size from 65k to 63k on MIPS

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/netifd/Makefile

index c18496c9233fab8979fadf478d12d6a3bf294714..2eaf38d5803b85002f5299518e7bad34d53c860d 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 \