[OpenWrt-Devel] [PATCH 3/4] swconfig: Activate LTO compile option
Hauke Mehrtens
hauke at hauke-m.de
Fri Nov 1 16:54:15 EDT 2019
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 <hauke at hauke-m.de>
---
package/network/config/swconfig/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/network/config/swconfig/Makefile b/package/network/config/swconfig/Makefile
index 8b1d6cd64a..4d3e572d82 100644
--- a/package/network/config/swconfig/Makefile
+++ b/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 \
--
2.20.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list