diff options
author | Deng Qingfang <dengqf6@mail2.sysu.edu.cn> | 2019-02-24 00:46:54 +0800 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2019-03-17 22:17:48 +0100 |
commit | 89c8232f78f4acd982f66bd285f1448bbbad1719 (patch) | |
tree | ce14d9e2d0e9a824333d2851b8d20b7f71976cf5 /package/network/utils/ipset | |
parent | d4540354303949c93b20ea0148afd90ce5e40ea6 (diff) | |
download | upstream-89c8232f78f4acd982f66bd285f1448bbbad1719.tar.gz upstream-89c8232f78f4acd982f66bd285f1448bbbad1719.tar.bz2 upstream-89c8232f78f4acd982f66bd285f1448bbbad1719.zip |
ipset: size optimizations
ipset utility was linked statically to libipset. Disable static library for dynamic linking to save space.
Add -Wl,--gc-sections,--as-needed for further reduction
MIPS ipk size:
ipset: 29KiB -> 2KiB
libipset: 39KiB -> 38KiB
Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Diffstat (limited to 'package/network/utils/ipset')
-rw-r--r-- | package/network/utils/ipset/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/package/network/utils/ipset/Makefile b/package/network/utils/ipset/Makefile index 37cff3aca4..69953c2e23 100644 --- a/package/network/utils/ipset/Makefile +++ b/package/network/utils/ipset/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ipset PKG_VERSION:=7.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://ipset.netfilter.org @@ -43,8 +43,11 @@ $(call Package/ipset/Default) endef CONFIGURE_ARGS += \ + --disable-static \ --with-kbuild="$(LINUX_DIR)" +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + MAKE_FLAGS += \ ARCH="$(LINUX_KARCH)" \ SHELL="$(BASH)" @@ -52,7 +55,7 @@ MAKE_FLAGS += \ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/include/libipset $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset.{a,so*} $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset.so* $(1)/usr/lib/ $(CP) $(PKG_BUILD_DIR)/lib/libipset.pc $(1)/usr/lib/pkgconfig/ endef |