Browse Source

netifd: compile with LTO enabled

Reduces .ipk size from 65k to 63k on MIPS

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 7 years ago
parent
commit
07940acc34
1 changed files with 4 additions and 1 deletions
  1. 4 1
      package/network/config/netifd/Makefile

+ 4 - 1
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 \