From 2d58169f1453886e4557ce28c29e32290de1bd97 Mon Sep 17 00:00:00 2001 From: Deng Qingfang Date: Tue, 4 Dec 2018 08:45:32 +0800 Subject: [PATCH 1/2] aria2: size optimizations Reduce binary size by about 22% Signed-off-by: Deng Qingfang --- net/aria2/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/aria2/Makefile b/net/aria2/Makefile index 940855697..5955828c8 100644 --- a/net/aria2/Makefile +++ b/net/aria2/Makefile @@ -80,6 +80,9 @@ CONFIGURE_ARGS += \ --without-libuv \ --with-libz +TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections -flto + define Package/aria2/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aria2c $(1)/usr/bin From 8d04517d6087e8591bcbc332bee1e636b10cf819 Mon Sep 17 00:00:00 2001 From: Deng Qingfang Date: Tue, 4 Dec 2018 08:49:27 +0800 Subject: [PATCH 2/2] aria2: enable build-parallel Signed-off-by: Deng Qingfang --- net/aria2/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/net/aria2/Makefile b/net/aria2/Makefile index 5955828c8..68dfc3010 100644 --- a/net/aria2/Makefile +++ b/net/aria2/Makefile @@ -14,6 +14,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/ PKG_HASH:=3a44a802631606e138a9e172a3e9f5bcbaac43ce2895c1d8e2b46f30487e77a3 PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_MAINTAINER:=Imre Kaloz , \ Hsing-Wang Liao