Browse Source

iproute2: update to 5.5.0, enable LTO

Update iproute2 to 5.5.0
Enable LTO to save several KB of size

Signed-off-by: DENG Qingfang <[email protected]>
DENG Qingfang 5 years ago
parent
commit
5715b21f80

+ 4 - 4
package/network/utils/iproute2/Makefile

@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iproute2
-PKG_VERSION:=5.4.0
-PKG_RELEASE:=2
+PKG_VERSION:=5.5.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
-PKG_HASH:=fe97aa60a0d4c5ac830be18937e18dc3400ca713a33a89ad896ff1e3d46086ae
+PKG_HASH:=bac543435cac208a11db44c9cc8e35aa902befef8750594654ee71941c388f7b
 PKG_BUILD_PARALLEL:=1
 PKG_BUILD_DEPENDS:=iptables
 PKG_LICENSE:=GPL-2.0
@@ -121,7 +121,7 @@ define Build/Configure
 		> $(PKG_BUILD_DIR)/include/SNAPSHOT.h
 endef
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
 TARGET_LDFLAGS += -Wl,--gc-sections
 TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
 

+ 1 - 1
package/network/utils/iproute2/patches/100-configure.patch

@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -32,7 +32,8 @@ int main(int argc, char **argv) {
+@@ -34,7 +34,8 @@ int main(int argc, char **argv) {
  }
  EOF
  

+ 1 - 1
package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch

@@ -8,5 +8,5 @@
 +	CFLAGS += -DXT_LIB_DIR=\"$(XT_LIB_DIR)\"
 +endif
  
- YACC := bison
  LEX := flex
+ CFLAGS += -DYY_NO_INPUT

+ 1 - 1
package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch

@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -255,7 +255,7 @@ check_selinux()
+@@ -257,7 +257,7 @@ check_selinux()
  
  check_mnl()
  {

+ 1 - 1
package/network/utils/iproute2/patches/145-keep_libelf_optional.patch

@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -228,7 +228,7 @@ EOF
+@@ -230,7 +230,7 @@ EOF
  
  check_elf()
  {

+ 1 - 1
package/network/utils/iproute2/patches/150-keep_libcap_optional.patch

@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -313,7 +313,7 @@ EOF
+@@ -315,7 +315,7 @@ EOF
  
  check_cap()
  {

+ 5 - 5
package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch

@@ -9,7 +9,7 @@
  endif
  
  TCLIB := tc_core.o
-@@ -141,7 +141,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
+@@ -140,7 +140,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
  all: tc $(TCSO)
  
  tc: $(TCOBJ) $(LIBNETLINK) libtc.a
@@ -18,15 +18,15 @@
  
  libtc.a: $(TCLIB)
  	$(QUIET_AR)$(AR) rcs $@ $^
-@@ -163,6 +163,7 @@ install: all
+@@ -162,6 +162,7 @@ install: all
  clean:
- 	rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.yacc.h; \
- 	rm -f emp_ematch.yacc.*
+ 	rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \
+ 	rm -f emp_ematch.tab.*
 +	rm -f dynsyms.list
  
  q_atm.so: q_atm.c
  	$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
-@@ -202,4 +203,15 @@ static-syms.h: $(wildcard *.c)
+@@ -201,4 +202,15 @@ static-syms.h: $(wildcard *.c)
  		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
  	done > $@
  

+ 1 - 1
package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch

@@ -31,7 +31,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY
  		if (!end || end == arg || *end || res > 255)
 --- a/include/uapi/linux/rtnetlink.h
 +++ b/include/uapi/linux/rtnetlink.h
-@@ -235,6 +235,7 @@ enum {
+@@ -242,6 +242,7 @@ enum {
  	RTN_THROW,		/* Not in this table		*/
  	RTN_NAT,		/* Translate this address	*/
  	RTN_XRESOLVE,		/* Use external resolver	*/

+ 1 - 1
package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch

@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -299,14 +299,8 @@ EOF
+@@ -301,14 +301,8 @@ EOF
      if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
  	echo "no"
      else