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 d11a13f..34b768a 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 248b1c0..0c19b20 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 d255ae7..20cd076 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 0385bd7..545b3c2 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 449d451..10c6b50 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 f6ec945..0d3cbe8 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