Browse Source

swconfig: Activate LTO compile option

This decreases the size of the swconfig application by 25% on MIPS BE.

old:
16,916 /sbin/swconfig

new:
12,565 /sbin/swconfig

Signed-off-by: Hauke Mehrtens <[email protected]>
Hauke Mehrtens 6 years ago
parent
commit
e926681387
1 changed files with 3 additions and 0 deletions
  1. 3 0
      package/network/config/swconfig/Makefile

+ 3 - 0
package/network/config/swconfig/Makefile

@@ -23,6 +23,9 @@ define Package/swconfig
   TITLE:=Switch configuration utility
 endef
 
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto=jobserver
+
 TARGET_CPPFLAGS := \
 	-D_GNU_SOURCE \
 	-I$(STAGING_DIR)/usr/include/libnl-tiny \