From cfe0def06d981f076ea3bead4a07bfcaee15580e Mon Sep 17 00:00:00 2001 From: "Maxin B. John" Date: Fri, 24 Feb 2017 18:07:07 +0200 Subject: iproute2: upgrade to 4.10.0 4.9.0 -> 4.10.0 added the following patch to fix build with musl libc 1) 0001-libc-compat.h-add-musl-workaround.patch (From OE-Core rev: 306c79e303bd09a2e35a037635e5943d8711ef3d) Signed-off-by: Maxin B. John Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../0001-libc-compat.h-add-musl-workaround.patch | 41 +++++++ .../iproute2/iproute2/iproute2-4.9.0-musl.patch | 131 --------------------- .../iproute2/iproute2_4.10.0.bb | 14 +++ .../iproute2/iproute2_4.9.0.bb | 14 --- 4 files changed, 55 insertions(+), 145 deletions(-) create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch delete mode 100644 meta/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch create mode 100644 meta/recipes-connectivity/iproute2/iproute2_4.10.0.bb delete mode 100644 meta/recipes-connectivity/iproute2/iproute2_4.9.0.bb diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch new file mode 100644 index 0000000000..3d324c96da --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch @@ -0,0 +1,41 @@ +From b7d96340c55afb7023ded0041107c63dbd886196 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Thu, 22 Dec 2016 15:26:30 +0200 +Subject: [PATCH] libc-compat.h: add musl workaround + +The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and +__USE_MISC) to solve conflicts with libc provided headers. This patch makes +libc-compat.h work for musl libc as well. + +Upstream-Status: Pending + +Taken From: +https://git.buildroot.net/buildroot/tree/package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch + +Signed-off-by: Baruch Siach +Signed-off-by: Maxin B. John +--- + include/linux/libc-compat.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/include/linux/libc-compat.h b/include/linux/libc-compat.h +index f38571d..30f0b67 100644 +--- a/include/linux/libc-compat.h ++++ b/include/linux/libc-compat.h +@@ -49,10 +49,12 @@ + #define _LIBC_COMPAT_H + + /* We have included glibc headers... */ +-#if defined(__GLIBC__) ++#if 1 ++#define __USE_MISC + + /* Coordinate with glibc net/if.h header. */ + #if defined(_NET_IF_H) && defined(__USE_MISC) ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 + + /* GLIBC headers included first so don't define anything + * that would already be defined. */ +-- +2.4.0 + diff --git a/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch b/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch deleted file mode 100644 index 737a90c6e2..0000000000 --- a/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch +++ /dev/null @@ -1,131 +0,0 @@ -Subject: [PATCH] Avoid in6_addr redefinition - -Due to both and being included, the -in6_addr is being redefined: once from the C library headers and once -from the kernel headers. This causes some build failures with for -example the musl C library. - -In order to fix this, use just the C library header . -Original patch taken from -http://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-fixes.patch. - -(Refreshed the patch for 4.9 release) - -Upstream-Status: Pending - -Signed-off-by: Thomas Petazzoni -Signed-off-by: Maxin B. John -Signed-off-by: Zheng Ruoqin ---- - include/libiptc/ipt_kernel_headers.h | 1 - - include/linux/if_bridge.h | 1 - - include/linux/if_tunnel.h | 2 -- - include/linux/netfilter.h | 2 -- - include/linux/netfilter_ipv4/ip_tables.h | 1 - - include/linux/xfrm.h | 1 - - include/utils.h | 1 + - ip/ip6tunnel.c | 1 - - 8 files changed, 1 insertion(+), 9 deletions(-) - -diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h -index a5963e9..42f8610 100644 ---- a/include/libiptc/ipt_kernel_headers.h -+++ b/include/libiptc/ipt_kernel_headers.h -@@ -6,7 +6,6 @@ - #include - - #include --#include - #include - #include - #include -diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h -index b7393dd..a7028ab 100644 ---- a/include/linux/if_bridge.h -+++ b/include/linux/if_bridge.h -@@ -15,7 +15,6 @@ - - #include - #include --#include - - #define SYSFS_BRIDGE_ATTR "bridge" - #define SYSFS_BRIDGE_FDB "brforward" -diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h -index 4f975f5..2680646 100644 ---- a/include/linux/if_tunnel.h -+++ b/include/linux/if_tunnel.h -@@ -2,9 +2,7 @@ - #define _IF_TUNNEL_H_ - - #include --#include - #include --#include - #include - - -diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h -index b71b4c9..3e4e6ae 100644 ---- a/include/linux/netfilter.h -+++ b/include/linux/netfilter.h -@@ -4,8 +4,6 @@ - #include - - #include --#include --#include - - /* Responses from hook functions. */ - #define NF_DROP 0 -diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h -index 456fb86..38542b4 100644 ---- a/include/linux/netfilter_ipv4/ip_tables.h -+++ b/include/linux/netfilter_ipv4/ip_tables.h -@@ -17,7 +17,6 @@ - - #include - --#include - #include - - #include -diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h -index d2dd1fd..8c72966 100644 ---- a/include/linux/xfrm.h -+++ b/include/linux/xfrm.h -@@ -1,7 +1,6 @@ - #ifndef _LINUX_XFRM_H - #define _LINUX_XFRM_H - --#include - #include - - /* All of the structures in this file may not change size as they are -diff --git a/include/utils.h b/include/utils.h -index 1b4f939..d10840b 100644 ---- a/include/utils.h -+++ b/include/utils.h -@@ -1,6 +1,7 @@ - #ifndef __UTILS_H__ - #define __UTILS_H__ 1 - -+#include /* MAXPATHLEN */ - #include - #include - #include -diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c -index b1c0ae6..8fa4eb2 100644 ---- a/ip/ip6tunnel.c -+++ b/ip/ip6tunnel.c -@@ -28,7 +28,6 @@ - #include - #include - #include --#include - #include - #include - #include --- -2.7.4 - diff --git a/meta/recipes-connectivity/iproute2/iproute2_4.10.0.bb b/meta/recipes-connectivity/iproute2/iproute2_4.10.0.bb new file mode 100644 index 0000000000..a050e8737e --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2_4.10.0.bb @@ -0,0 +1,14 @@ +require iproute2.inc + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ + file://configure-cross.patch \ + file://0001-iproute2-de-bash-scripts.patch \ + file://0001-libc-compat.h-add-musl-workaround.patch \ + " + +SRC_URI[md5sum] = "b94a2b0edefaeac124dc8f5d006931b9" +SRC_URI[sha256sum] = "22b1e1c1fc704ad35837e5a66103739727b8b48ac90b48c13f79b7367ff0a9a8" + +# CFLAGS are computed in Makefile and reference CCOPTS +# +EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'" diff --git a/meta/recipes-connectivity/iproute2/iproute2_4.9.0.bb b/meta/recipes-connectivity/iproute2/iproute2_4.9.0.bb deleted file mode 100644 index 808e5502cd..0000000000 --- a/meta/recipes-connectivity/iproute2/iproute2_4.9.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -require iproute2.inc - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ - file://configure-cross.patch \ - file://0001-iproute2-de-bash-scripts.patch \ - file://iproute2-4.9.0-musl.patch \ - " - -SRC_URI[md5sum] = "44a8371a4b2c40e48e4c9f98cbd41391" -SRC_URI[sha256sum] = "c0f30f043f7767cc1b2cd2197b08d4e9b2392c95823fabe30bbce308c30116c4" - -# CFLAGS are computed in Makefile and reference CCOPTS -# -EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'" -- cgit 1.2.3-korg