public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/
@ 2022-06-11  5:36 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-06-11  5:36 UTC (permalink / raw
  To: gentoo-commits

commit:     81f78148645a266219e9a3e72663f7473e0de6c6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 11 05:34:14 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 11 05:36:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81f78148

net-libs/xdp-tools: drop Werror

Closes: https://bugs.gentoo.org/846938
Closes: https://bugs.gentoo.org/831339
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/xdp-tools-1.2.3-no-werror.patch          | 73 ++++++++++++++++++++++
 net-libs/xdp-tools/xdp-tools-1.2.3.ebuild          |  4 ++
 2 files changed, 77 insertions(+)

diff --git a/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch b/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch
new file mode 100644
index 000000000000..6d7d7fd955a3
--- /dev/null
+++ b/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch
@@ -0,0 +1,73 @@
+https://bugs.gentoo.org/831339
+https://bugs.gentoo.org/846938
+--- 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
+--- a/lib/common.mk
++++ b/lib/common.mk
+@@ -113,7 +113,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}
+ 
+--- a/lib/defines.mk
++++ b/lib/defines.mk
+@@ -39,7 +39,7 @@ endif
+ 
+ DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ 
+-CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES)
++CFLAGS += -std=gnu11 -Wextra $(DEFINES)
+ BPF_CFLAGS += $(DEFINES)
+ 
+ CONFIGMK := $(LIB_DIR)/../config.mk
+--- a/lib/libxdp/Makefile
++++ b/lib/libxdp/Makefile
+@@ -19,7 +19,7 @@ MAN_OBJ := ${MAN_PAGE:.3=.man}
+ MAN_FILES := $(MAN_PAGE)
+ TEST_DIR := tests
+ TEST_FILE := $(TEST_DIR)/test-libxdp.sh
+-TEST_CFLAGS := $(CFLAGS) -I$(realpath $(HEADER_DIR)) -L$(realpath $(OBJDIR)) -Wall -Werror $(LDFLAGS)
++TEST_CFLAGS := $(CFLAGS) -I$(realpath $(HEADER_DIR)) -L$(realpath $(OBJDIR)) -Wall $(LDFLAGS)
+ TEST_LDLIBS := $(LDLIBS)
+ 
+ SHARED_CFLAGS += -fPIC -DSHARED
+@@ -144,7 +144,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/configure b/configure
+index 0a17eae..fd251b7 100755
+--- a/configure
++++ b/configure
+@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
+     return 0;
+ }
+ EOF
+-    libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
++    libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
+     if [ "$?" -eq "0" ]; then
+         echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
+         echo "yes"
+@@ -254,7 +254,7 @@ int main(int argc, char **argv) {
+ }
+ EOF
+ 
+-        libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
++        libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
+         if [ "$?" -eq "0" ]; then
+             echo "SYSTEM_LIBBPF:=y" >>$CONFIG
+             echo "LIBBPF_VERSION=$LIBBPF_VERSION" >>$CONFIG

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild b/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
index 0dd14f1dc39b..4077d16404d0 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
@@ -25,6 +25,10 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 
 MAKEOPTS+=" V=1"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.2.3-no-werror.patch
+)
+
 src_configure() {
 	export PRODUCTION=1
 	export DYNAMIC_LIBXDP=1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/
@ 2023-03-05 11:19 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-03-05 11:19 UTC (permalink / raw
  To: gentoo-commits

commit:     8eea55ff639c63ce54f5feba1d3300e40d4814b9
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Sat Mar  4 15:16:10 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar  5 11:19:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8eea55ff

net-libs/xdp-tools: bump to 1.3.1 & add build fixes

- fix configure to properly detect libbpf features
- fix clang build with default-enabled stack protector

Closes: https://bugs.gentoo.org/889842
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/29926
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/xdp-tools/Manifest                        |  2 +-
 .../files/1.3.1-disable-stack-protector.patch      | 32 +++++++++++++++++++
 .../files/1.3.1-fix-btf__type_cnt-detection.patch  | 36 ++++++++++++++++++++++
 ...p-tools-1.2.8.ebuild => xdp-tools-1.3.1.ebuild} |  7 ++++-
 4 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 9e3d03e1cffd..2fda18e4cc09 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1 +1 @@
-DIST xdp-tools-1.2.8.tar.gz 253786 BLAKE2B f745085b73da5193c3cdaf60c20dfa5de62f3d83487413c87b4c3d07b755dcf91cfbeb4ba970b4e04eef74b4cec4238057f4462074f49b7139d7652cb0f22998 SHA512 6ada9e433fcbefd13cebdffe93c3ce9159e9e09f1498d1615918ca6ecc4f11f03fcd9096980e8ceb7de126d4d8b953fa64917e777d54b5a3dfd1a9556de81626
+DIST xdp-tools-1.3.1.tar.gz 330516 BLAKE2B 89a61f47ba26efe6d0630d971e913e034d111d05c896e5af1bb28e6cb4e94133e6ecd827a10ee12a935ae2e6856f04556ac564ded1bcc65182766d656f8d0c5f SHA512 9dd434095a043158d14fb6829fa632fc4a0714dc0b6e08c219dfb55cb9f34005300db750115e08bd54210e90142bd499904616da077b8aa827e4de28c31be637

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
new file mode 100644
index 000000000000..3a37b26efa14
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch
@@ -0,0 +1,32 @@
+
+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
new file mode 100644
index 000000000000..d805e1077c76
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch
@@ -0,0 +1,36 @@
+
+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/xdp-tools-1.2.8.ebuild b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
similarity index 88%
rename from net-libs/xdp-tools/xdp-tools-1.2.8.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
index 0dd14f1dc39b..fdc4068a030e 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.8.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,6 +25,11 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 
 MAKEOPTS+=" V=1"
 
+PATCHES=(
+	"${FILESDIR}"/1.3.1-disable-stack-protector.patch
+	"${FILESDIR}"/1.3.1-fix-btf__type_cnt-detection.patch
+)
+
 src_configure() {
 	export PRODUCTION=1
 	export DYNAMIC_LIBXDP=1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/
@ 2023-03-29  1:32 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-03-29  1:32 UTC (permalink / raw
  To: gentoo-commits

commit:     eb5fa24cb8025bab6db68cea47240a5968cd6021
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 29 01:32:10 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 29 01:32:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb5fa24c

net-libs/xdp-tools: fix build w/ musl

Closes: https://bugs.gentoo.org/836708
Thanks-to: Stijn Tintel <stijn <AT> linux-ipv6.be>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/xdp-tools/files/1.3.1-musl.patch    | 28 ++++++++++++++++++++++++++++
 net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild |  1 +
 2 files changed, 29 insertions(+)

diff --git a/net-libs/xdp-tools/files/1.3.1-musl.patch b/net-libs/xdp-tools/files/1.3.1-musl.patch
new file mode 100644
index 000000000000..e3238871b262
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.3.1-musl.patch
@@ -0,0 +1,28 @@
+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/xdp-tools-1.3.1-r2.ebuild b/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
index 9bc3e28993a8..543536b75ae6 100644
--- a/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
 	"${FILESDIR}"/1.3.1-fix-btf__type_cnt-detection.patch
 	"${FILESDIR}"/1.3.1-no-Werror.patch
 	"${FILESDIR}"/1.3.1-xdpdump-clang.patch
+	"${FILESDIR}"/1.3.1-musl.patch
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/
@ 2023-04-16  6:56 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-04-16  6:56 UTC (permalink / raw
  To: gentoo-commits

commit:     c09f56693f0b6e739ac3d4d28933219600d1dd72
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Thu Apr 13 20:38:24 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 16 06:54:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c09f5669

net-libs/xdp-tools: reinstate -Werror for configure

The patch to remove -Werror from the build was a little bit too thorough
and removed -Werror from the configure script, where it is required.

Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/30586
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/xdp-tools/files/1.3.1-no-Werror.patch     | 22 ----------------------
 ...s-1.3.1-r2.ebuild => xdp-tools-1.3.1-r3.ebuild} |  0
 2 files changed, 22 deletions(-)

diff --git a/net-libs/xdp-tools/files/1.3.1-no-Werror.patch b/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
index 7545c49b1c2e..fb086f5122b9 100644
--- a/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
+++ b/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
@@ -1,28 +1,6 @@
 
 Bug: https://bugs.gentoo.org/899744
 
-diff --git a/configure b/configure
-index 62c2f88..230637f 100755
---- a/configure
-+++ b/configure
-@@ -249,7 +249,7 @@ int main(int argc, char **argv) {
-     return 0;
- }
- EOF
--    compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS"
-+    compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS"
-     libbpf_err=$($compile_cmd 2>&1)
-     if [ "$?" -eq "0" ]; then
-         echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
-@@ -323,7 +323,7 @@ int main(int argc, char **argv) {
- }
- EOF
- 
--        libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
-+        libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
-         if [ "$?" -eq "0" ]; then
-             echo "SYSTEM_LIBBPF:=y" >>$CONFIG
-             echo "LIBBPF_VERSION=$LIBBPF_VERSION" >>$CONFIG
 diff --git a/lib/Makefile b/lib/Makefile
 index 5ee035d..5342ab3 100644
 --- a/lib/Makefile

diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild b/net-libs/xdp-tools/xdp-tools-1.3.1-r3.ebuild
similarity index 100%
rename from net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.3.1-r3.ebuild


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/
@ 2023-11-22 12:02 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-11-22 12:02 UTC (permalink / raw
  To: gentoo-commits

commit:     08af5d6c5ee75d2e7cb6ddf254a15ea1c1924d49
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Thu Nov  2 11:14:21 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 22 12:02:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08af5d6c

net-libs/xdp-tools: Use sed instead of patch for -Werror

Less fragile & easier to maintain.

Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/xdp-tools/files/1.4.1-no-Werror.patch | 75 --------------------------
 net-libs/xdp-tools/xdp-tools-1.4.1.ebuild      | 10 +++-
 2 files changed, 9 insertions(+), 76 deletions(-)

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
deleted file mode 100644
index 52c50261f5d8..000000000000
--- a/net-libs/xdp-tools/files/1.4.1-no-Werror.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-
-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}
- 

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild b/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
index 53974f63d493..5fd0485f706d 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
@@ -33,9 +33,17 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 MAKEOPTS+=" V=1"
 
 PATCHES=(
-	"${FILESDIR}"/1.4.1-no-Werror.patch
 )
 
+src_prepare() {
+	# remove -Werror: #899744
+	sed -i 's/-Werror//g' lib/Makefile lib/defines.mk
+	sed -i '/-Werror/d' lib/common.mk lib/libxdp/Makefile \
+		lib/libxdp/tests/Makefile lib/util/Makefile
+
+	default
+}
+
 src_configure() {
 	export CC="$(tc-getCC)"
 	export LD="$(tc-getLD)"


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-22 12:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-16  6:56 [gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-11-22 12:02 Sam James
2023-03-29  1:32 Sam James
2023-03-05 11:19 Sam James
2022-06-11  5:36 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox