diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile index 67236ea3177..6ea4fb0bbe6 100644 --- a/package/network/utils/xdp-tools/Makefile +++ b/package/network/utils/xdp-tools/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xdp-tools -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_VERSION:=1.6.3 PKG_HASH:=78da363ff7dcf1a586f47800f16d644022bd33f3844864061a44616fce854fd8 @@ -150,6 +150,7 @@ CONFIGURE_VARS += \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ CLANG="$(CLANG)" \ + ARCH_INCLUDES="$(patsubst %,-idirafter%,$(TOOLCHAIN_INC_DIRS))" \ BPFTOOL="$(STAGING_DIR_HOST)/usr/sbin/bpftool" ifneq ($(findstring s,$(OPENWRT_VERBOSE)),) diff --git a/package/network/utils/xdp-tools/patches/0004-configure-do-not-use-bash-redirection.patch b/package/network/utils/xdp-tools/patches/0004-configure-do-not-use-bash-redirection.patch new file mode 100644 index 00000000000..8b9e31978bb --- /dev/null +++ b/package/network/utils/xdp-tools/patches/0004-configure-do-not-use-bash-redirection.patch @@ -0,0 +1,31 @@ +From: John Crispin +Subject: [PATCH] configure: do not use a bash redirection + +configure runs with /bin/sh, but uses the bash redirection &> to check +for bpftool. A POSIX shell such as dash runs "command -v $BPFTOOL" in +the background instead, so configure replaces BPFTOOL with the output +of whereis and does not find bpftool, although it is available. + +Use >/dev/null 2>&1, which all shells support. + +Signed-off-by: John Crispin +--- + configure | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/configure ++++ b/configure +@@ -109,11 +109,11 @@ + exit 1 + fi + +- if ! command -v $BPFTOOL &>/dev/null; then ++ if ! command -v $BPFTOOL >/dev/null 2>&1; then + BPFTOOL=$(whereis -b bpftool | awk '{print $2}') + fi + +- if command -v $BPFTOOL &>/dev/null && $BPFTOOL gen help 2>&1 | grep 'gen skeleton.*name' > /dev/null; then ++ if command -v $BPFTOOL >/dev/null 2>&1 && $BPFTOOL gen help 2>&1 | grep 'gen skeleton.*name' > /dev/null; then + bpftool_version=$($BPFTOOL version | head -n 1) + echo "using $bpftool_version" + else