diff options
author | Sam James <sam@gentoo.org> | 2022-06-11 06:34:14 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-11 06:36:03 +0100 |
commit | 81f78148645a266219e9a3e72663f7473e0de6c6 (patch) | |
tree | 79d881395db3af40051ab7cbbf68b276b811686e /net-libs/xdp-tools | |
parent | app-misc/vifm: drop Werror (diff) | |
download | gentoo-81f78148645a266219e9a3e72663f7473e0de6c6.tar.gz gentoo-81f78148645a266219e9a3e72663f7473e0de6c6.tar.bz2 gentoo-81f78148645a266219e9a3e72663f7473e0de6c6.zip |
net-libs/xdp-tools: drop Werror
Closes: https://bugs.gentoo.org/846938
Closes: https://bugs.gentoo.org/831339
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/xdp-tools')
-rw-r--r-- | net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch | 73 | ||||
-rw-r--r-- | net-libs/xdp-tools/xdp-tools-1.2.3.ebuild | 4 |
2 files changed, 77 insertions, 0 deletions
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 |