mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
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 <ldir@darbyshire-bryant.me.uk>
This commit is contained in:
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=miniupnpd
|
PKG_NAME:=miniupnpd
|
||||||
PKG_VERSION:=2.0.20180503
|
PKG_VERSION:=2.0.20180503
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
|
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
@@ -39,6 +39,8 @@ define Build/Prepare
|
|||||||
echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
|
echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections
|
||||||
|
TARGET_LDFLAGS += -flto -Wl,--gc-sections
|
||||||
MAKE_FLAGS += \
|
MAKE_FLAGS += \
|
||||||
TARGET_OPENWRT=1 TEST=0 LIBS="" \
|
TARGET_OPENWRT=1 TEST=0 LIBS="" \
|
||||||
CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
|
CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
|
||||||
|
|||||||
Reference in New Issue
Block a user