jansson: Activate link time optimization (LTO)
authorHauke Mehrtens <hauke@hauke-m.de>
Tue, 1 Sep 2020 12:02:47 +0000 (14:02 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 6 Sep 2020 18:30:18 +0000 (20:30 +0200)
The ipk sizes for mips_24Kc change like this:
old:
jansson4_2.13.1-1_mips_24kc.ipk 19.171

new:
jansson4_2.13.1-2_mips_24kc.ipk 18.936

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/libs/jansson/Makefile

index 247be3401bd8237e57ee1f8138af3402d3039d04..5799a362dd5f01962d826babddcaea25f972fa7e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=jansson
 PKG_VERSION:=2.13.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
@@ -39,6 +39,9 @@ define Package/jansson/description
   Jansson is a C library for encoding, decoding and manipulating JSON data
 endef
 
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -flto
+
 define Package/jansson/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so* $(1)/usr/lib/