summaryrefslogtreecommitdiff
path: root/net-libs/xdp-tools/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-27 08:42:41 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-27 08:42:41 +0100
commit0fcaac21e786bd7911b1e8f436cd885c5e2f6437 (patch)
treeba392915815492b0ce486fc0e3ad5afb4a849b6f /net-libs/xdp-tools/files
parente30edd47e1804bf3ed1ea7be2eac67f4b8cd9f38 (diff)
gentoo auto-resync : 27:10:2023 - 08:42:41
Diffstat (limited to 'net-libs/xdp-tools/files')
-rw-r--r--net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch32
-rw-r--r--net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch36
-rw-r--r--net-libs/xdp-tools/files/1.3.1-musl.patch28
-rw-r--r--net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch36
-rw-r--r--net-libs/xdp-tools/files/1.4.0-no-Werror.patch (renamed from net-libs/xdp-tools/files/1.3.1-no-Werror.patch)0
-rw-r--r--net-libs/xdp-tools/files/1.4.1-no-Werror.patch75
6 files changed, 75 insertions, 132 deletions
diff --git a/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch b/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch
deleted file mode 100644
index 3a37b26efa14..000000000000
--- a/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-
-From: https://github.com/xdp-project/xdp-tools/commit/cb6d06219d1b49b07980b481a383e1dea74a0702
-Bug: https://bugs.gentoo.org/889842
-
-From cb6d06219d1b49b07980b481a383e1dea74a0702 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
-Date: Sat, 4 Mar 2023 20:08:25 +0100
-Subject: [PATCH] make: disable stack protector for BPF bits built by clang
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The clang toolchain might have stack-protection enabled by default
-(e.g. via platform configuration) and that won't work for BPF,
-so unconfitionally disable it via -fno-stack-protector.
-
-Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
----
- lib/defines.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/defines.mk b/lib/defines.mk
-index f134c43b..54b259f2 100644
---- a/lib/defines.mk
-+++ b/lib/defines.mk
-@@ -1,5 +1,5 @@
- CFLAGS ?= -O2 -g
--BPF_CFLAGS ?= -Wno-visibility
-+BPF_CFLAGS ?= -Wno-visibility -fno-stack-protector
- BPF_TARGET ?= bpf
-
- HAVE_FEATURES :=
diff --git a/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch b/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch
deleted file mode 100644
index d805e1077c76..000000000000
--- a/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-
-From https://github.com/xdp-project/xdp-tools/commit/a7df567634af77381832a2212c5f5099b07734f3
-
-From a7df567634af77381832a2212c5f5099b07734f3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
-Date: Sat, 4 Mar 2023 20:07:39 +0100
-Subject: [PATCH] configure: Fix function detection for btf__type_cnt()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The configure check for btf__type_cnt() swapped two arguments in the
-check_libbpf_function() call in the configure script, leading to the check
-failing if LIBBPF_CFLAGS is non-empty. Make sure the arguments are in the
-right order, and also pass a proper NULL parameter in the check instead of
-a 0.
-
-Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com>
-Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index 016c5bbd..62c2f883 100755
---- a/configure
-+++ b/configure
-@@ -272,7 +272,7 @@ check_libbpf_functions()
-
- check_libbpf_function "perf_buffer__consume" "(NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
- check_libbpf_function "btf__load_from_kernel_by_id" "(0)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
-- check_libbpf_function "btf__type_cnt" "(0)" "$LIBBPF_CFLAGS" "" "$LIBBPF_LDLIBS"
-+ check_libbpf_function "btf__type_cnt" "(NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
- check_libbpf_function "bpf_object__next_map" "(NULL, NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
- check_libbpf_function "bpf_object__next_program" "(NULL, NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
- check_libbpf_function "bpf_program__insn_cnt" "(NULL)" "" "$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
diff --git a/net-libs/xdp-tools/files/1.3.1-musl.patch b/net-libs/xdp-tools/files/1.3.1-musl.patch
deleted file mode 100644
index e3238871b262..000000000000
--- a/net-libs/xdp-tools/files/1.3.1-musl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-https://bugs.gentoo.org/836708
-https://github.com/xdp-project/xdp-tools/pull/309
-
-From c9956abbfbd238bd2eb98c67ea002bfce29063a4 Mon Sep 17 00:00:00 2001
-From: Stijn Tintel <stijn@linux-ipv6.be>
-Date: Wed, 29 Mar 2023 04:25:06 +0300
-Subject: [PATCH] libxdp: fix build on musl
-
-In musl, PATH_MAX is defined in limits.h. Include it in libxdp.c to fix
-building systems using musl libc.
-
-libxdp.c: In function 'find_bpffs':
-libxdp.c:406:33: error: 'PATH_MAX' undeclared (first use in this function)
- 406 | static char bpf_wrk_dir[PATH_MAX];
- | ^~~~~~~~
-
-Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---- a/lib/libxdp/libxdp.c
-+++ b/lib/libxdp/libxdp.c
-@@ -22,6 +22,7 @@
- #include <fcntl.h>
- #include <inttypes.h>
- #include <dirent.h>
-+#include <limits.h>
-
- #include <linux/err.h> /* ERR_PTR */
- #include <linux/if_link.h>
-
diff --git a/net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch b/net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch
deleted file mode 100644
index 3983c8c8f402..000000000000
--- a/net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-
-From: https://github.com/xdp-project/xdp-tools/commit/344b241da22a5358c714d6db1ea6f225f951dbdb
-
-From 344b241da22a5358c714d6db1ea6f225f951dbdb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
-Date: Wed, 8 Mar 2023 18:50:56 +0100
-Subject: [PATCH] xdpdump: fix build with clang
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When building all of xdp-tools with clang, the xdp-dump build fails
-due to 'classic' use of variable-length arrays and -Werror.
-Disable the warning and leave a breadcrumb to the discussion.
-
-Fixes: #304
-Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
----
- xdp-dump/Makefile | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/xdp-dump/Makefile b/xdp-dump/Makefile
-index 7ee1688e..a9ae0ae7 100644
---- a/xdp-dump/Makefile
-+++ b/xdp-dump/Makefile
-@@ -4,6 +4,10 @@ XDP_TARGETS := xdpdump_bpf xdpdump_xdp
- USER_TARGETS := xdpdump
- TEST_FILE := tests/test-xdpdump.sh
-
-+# Disable warnings about VLAs not being at the end of a structure when building
-+# with clang. The code is fine, but clang's complaint coupled with -Werror would
-+# break the build. See https://github.com/xdp-project/xdp-tools/issues/304
-+CFLAGS += "-Wno-gnu-variable-sized-type-not-at-end"
- LIB_DIR = ../lib
- USER_LIBS = -lpcap
- MAN_PAGE := xdpdump.8
diff --git a/net-libs/xdp-tools/files/1.3.1-no-Werror.patch b/net-libs/xdp-tools/files/1.4.0-no-Werror.patch
index fb086f5122b9..fb086f5122b9 100644
--- a/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
+++ b/net-libs/xdp-tools/files/1.4.0-no-Werror.patch
diff --git a/net-libs/xdp-tools/files/1.4.1-no-Werror.patch b/net-libs/xdp-tools/files/1.4.1-no-Werror.patch
new file mode 100644
index 000000000000..52c50261f5d8
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.4.1-no-Werror.patch
@@ -0,0 +1,75 @@
+
+Bug: https://bugs.gentoo.org/899744
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 5ee035d..5342ab3 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -1,5 +1,5 @@
+
+-LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Werror -Wall) -fPIC
++LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Wall) -fPIC
+
+ LIB_DIR = .
+ include defines.mk
+diff --git a/lib/common.mk b/lib/common.mk
+index b680a75..8dbcb39 100644
+--- a/lib/common.mk
++++ b/lib/common.mk
+@@ -116,7 +116,6 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) $(BPF_HEADERS) $(LIBMK)
+ -Wno-unused-value \
+ -Wno-pointer-sign \
+ -Wno-compare-distinct-pointer-types \
+- -Werror \
+ -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+ $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+
+diff --git a/lib/defines.mk b/lib/defines.mk
+index 54b259f..ed246c0 100644
+--- a/lib/defines.mk
++++ b/lib/defines.mk
+@@ -40,7 +40,7 @@ endif
+
+ DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+
+-CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES) $(ARCH_INCLUDES)
++CFLAGS += -std=gnu11 -Wextra $(DEFINES) $(ARCH_INCLUDES)
+ BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) $(ARCH_INCLUDES)
+
+ CONFIGMK := $(LIB_DIR)/../config.mk
+diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
+index 431932a..a0c625d 100644
+--- a/lib/libxdp/Makefile
++++ b/lib/libxdp/Makefile
+@@ -142,7 +142,6 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK)
+ -Wno-unused-value \
+ -Wno-pointer-sign \
+ -Wno-compare-distinct-pointer-types \
+- -Werror \
+ -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+ $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+
+diff --git a/lib/libxdp/tests/Makefile b/lib/libxdp/tests/Makefile
+index 3c22901..a4463f3 100644
+--- a/lib/libxdp/tests/Makefile
++++ b/lib/libxdp/tests/Makefile
+@@ -72,7 +72,6 @@ $(BPF_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK) $(EXTRA_DEPS)
+ -Wno-unused-value \
+ -Wno-pointer-sign \
+ -Wno-compare-distinct-pointer-types \
+- -Werror \
+ -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+ $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+
+diff --git a/lib/util/Makefile b/lib/util/Makefile
+index 24070f0..37485b3 100644
+--- a/lib/util/Makefile
++++ b/lib/util/Makefile
+@@ -26,7 +26,6 @@ $(UTIL_BPF_OBJS): %.o: %.c $(KERN_USER_H) $(BPF_HEADERS) $(LIBMK)
+ -Wno-unused-value \
+ -Wno-pointer-sign \
+ -Wno-compare-distinct-pointer-types \
+- -Werror \
+ -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+ $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+