From 2777953325b67b349a809ddbf17b0bd8c9e62b3a Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Tue, 8 May 2018 18:11:16 +0100 Subject: [PATCH 1/2] miniupnpd: build with gc-sections & LTO Building with --gc-sections & -flto drop ipk size from 72600 to 66345 on MIPS No misbehaviour due to these optimisations observed. Signed-off-by: Kevin Darbyshire-Bryant --- net/miniupnpd/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile index f7e3c39bc..ba9929418 100644 --- a/net/miniupnpd/Makefile +++ b/net/miniupnpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpd PKG_VERSION:=2.0.20180503 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://miniupnp.free.fr/files PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -39,6 +39,8 @@ define Build/Prepare echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt endef +TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections +TARGET_LDFLAGS += -flto -Wl,--gc-sections MAKE_FLAGS += \ TARGET_OPENWRT=1 TEST=0 LIBS="" \ CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \ From 569ed29e6364cbc0eebe11114511fb8f4e637fa3 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Wed, 9 May 2018 13:37:05 +0100 Subject: [PATCH 2/2] miniupnpd: change leasefile location Move default leasefile location from /var to /var/run. Also rename from upnp.leases to miniupnpd.leases Signed-off-by: Kevin Darbyshire-Bryant --- net/miniupnpd/Makefile | 2 +- net/miniupnpd/files/upnpd.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile index ba9929418..5ddb5f50d 100644 --- a/net/miniupnpd/Makefile +++ b/net/miniupnpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpd PKG_VERSION:=2.0.20180503 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_URL:=http://miniupnp.free.fr/files PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/net/miniupnpd/files/upnpd.config b/net/miniupnpd/files/upnpd.config index 55bbdde2c..299664362 100644 --- a/net/miniupnpd/files/upnpd.config +++ b/net/miniupnpd/files/upnpd.config @@ -10,7 +10,7 @@ config upnpd config # option external_iface wan option internal_iface lan option port 5000 - option upnp_lease_file /var/upnp.leases + option upnp_lease_file /var/run/miniupnpd.leases option igdv1 0 config perm_rule