[OpenWrt-Devel] [PATCH 4/4] usign: Activate LTO compile option

Hauke Mehrtens hauke at hauke-m.de
Fri Nov 1 16:54:16 EDT 2019


This decreases the size of the usign application by 16% on MIPS BE.

old:
24,597 /usr/bin/usign

new:
20,501 /usr/bin/usign

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/system/usign/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/system/usign/Makefile b/package/system/usign/Makefile
index 836b1524d3..ab7fda33a3 100644
--- a/package/system/usign/Makefile
+++ b/package/system/usign/Makefile
@@ -30,6 +30,9 @@ define Package/usign
   TITLE:=OpenWrt signature verification utility
 endef
 
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto=jobserver
+
 CMAKE_OPTIONS += \
 	-DUSE_LIBUBOX=on
 
-- 
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