iproute2: update to 5.5.0, enable LTO
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Wed, 12 Feb 2020 12:23:01 +0000 (20:23 +0800)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 13 Feb 2020 20:35:13 +0000 (21:35 +0100)
Update iproute2 to 5.5.0
Enable LTO to save several KB of size

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
package/network/utils/iproute2/Makefile
package/network/utils/iproute2/patches/100-configure.patch
package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch
package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch
package/network/utils/iproute2/patches/145-keep_libelf_optional.patch
package/network/utils/iproute2/patches/150-keep_libcap_optional.patch
package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch
package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch

index d11a13facc9a859692aada3faf956b2bbda204a1..34b768a90677774e8ed29097286ee185d8bf5f02 100644 (file)
@@ -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
 
index 248b1c0e0180346aa57a7a236d274f1780eda3bf..0c19b2086a95bce170e56cf199a8c5fa5e86082f 100644 (file)
@@ -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
  
index 720a7ac1e9c6e048cb300a5f1821f061a1489e13..fa5ab8b9afa9addb244afbbd5e9502f803dfcf0f 100644 (file)
@@ -8,5 +8,5 @@
 +      CFLAGS += -DXT_LIB_DIR=\"$(XT_LIB_DIR)\"
 +endif
  
- YACC := bison
  LEX := flex
+ CFLAGS += -DYY_NO_INPUT
index d255ae7b0e3b744e546e219187cc30b987faba32..20cd0766a19c2024564d5f7ed8e2c3663be2028d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -255,7 +255,7 @@ check_selinux()
+@@ -257,7 +257,7 @@ check_selinux()
  
  check_mnl()
  {
index 2e3ad18809c424fbe401ccce85159a7d0347c0f2..d25c719f8e2a3a98e8a8c4f1e6353a5a00c7a35d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -228,7 +228,7 @@ EOF
+@@ -230,7 +230,7 @@ EOF
  
  check_elf()
  {
index 05336a737c271aaf11a78874be69a7c28a459780..d15549e3d2a5078e28c68ef9ea6a0b90162b7aa1 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -313,7 +313,7 @@ EOF
+@@ -315,7 +315,7 @@ EOF
  
  check_cap()
  {
index 0385bd737b25602d7f90fa655efa21af486075ac..545b3c2c06e343ca174b0a0444028a72033cd1c4 100644 (file)
@@ -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
  
  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 > $@
  
index 449d4512fe2aebf42f7419bf8523cc6c2399f973..10c6b50b5d575a625187747393e0a1aa5f528a6f 100644 (file)
@@ -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        */
index f6ec94529752142965604370e4f39c98f6c7bcf9..0d3cbe8dfb3c5cdbfd57f4d547b5c682873d1d98 100644 (file)
@@ -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