lldpd: further size reductions
authorStijn Tintel <stijn@linux-ipv6.be>
Mon, 5 Apr 2021 15:48:41 +0000 (18:48 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 5 Apr 2021 15:50:17 +0000 (18:50 +0300)
Size difference on mips_4kec:
Before: 120196
After:  120006

Closes https://github.com/openwrt/openwrt/pull/3823

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Suggested-by: Lucian Cristian <lucian.cristian@gmail.com>
package/network/services/lldpd/Makefile

index 7b9bcccd4deaf7624d42d4ac6a48c7533d3e2f1c..920e113e66ee2666b64805f1cabb2dcaa1e0f47f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lldpd
 PKG_VERSION:=1.0.9
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://media.luffy.cx/files/lldpd
@@ -111,6 +111,6 @@ CONFIGURE_ARGS += \
        $(if $(CONFIG_USE_GLIBC),,--without-libbsd)
 
 TARGET_CFLAGS += -flto
-TARGET_LDFLAGS += -flto
+TARGET_LDFLAGS += -flto -Wl,--gc-sections,--as-needed
 
 $(eval $(call BuildPackage,lldpd))