aboutsummaryrefslogtreecommitdiffstats
path: root/build/external/patches/xdp-tools_1.2.9/0003-lib-define.mk-add-flags-for-compiler.patch
diff options
context:
space:
mode:
authorfenglei <1579628578@qq.com>2025-01-14 16:50:10 +0800
committerBenoit Ganne <bganne@cisco.com>2025-01-17 16:30:55 +0000
commit38097970c038de6c3c67cb8e1c7209f1df1f24d0 (patch)
treefd333a81a035044a5a972044d383aebf0b5787dc /build/external/patches/xdp-tools_1.2.9/0003-lib-define.mk-add-flags-for-compiler.patch
parenteaf1059c8bad07268578eac3bdbbb116da0be38b (diff)
af_xdp: fix af_xdp compile waring for clang compiler
Type: fix - add check variable undefine init flags for gcc and clang compiler - disable compile xdp-dump Change-Id: Icd2b81ec5cd5dc66db395a69f8af889635f664e0 Signed-off-by: fenglei <1579628578@qq.com>
Diffstat (limited to 'build/external/patches/xdp-tools_1.2.9/0003-lib-define.mk-add-flags-for-compiler.patch')
-rw-r--r--build/external/patches/xdp-tools_1.2.9/0003-lib-define.mk-add-flags-for-compiler.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/build/external/patches/xdp-tools_1.2.9/0003-lib-define.mk-add-flags-for-compiler.patch b/build/external/patches/xdp-tools_1.2.9/0003-lib-define.mk-add-flags-for-compiler.patch
new file mode 100644
index 00000000000..4a3fe14364e
--- /dev/null
+++ b/build/external/patches/xdp-tools_1.2.9/0003-lib-define.mk-add-flags-for-compiler.patch
@@ -0,0 +1,29 @@
+From 6b0770e70df3ab02ad2a62f6426668746d4432ba Mon Sep 17 00:00:00 2001
+From: fenglei <1579628578@qq.com>
+Date: Wed, 15 Jan 2025 09:47:36 +0800
+Subject: [PATCH 5/5] lib/define.mk: add flags for compiler
+
+Signed-off-by: fenglei <1579628578@qq.com>
+---
+ lib/defines.mk | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/defines.mk b/lib/defines.mk
+index f3ff3d3..781d5f2 100644
+--- a/lib/defines.mk
++++ b/lib/defines.mk
+@@ -41,6 +41,11 @@ endif
+ DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+
+ CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES) $(ARCH_INCLUDES)
++ifeq ($(CC), clang)
++ CFLAGS += -Wno-uninitialized
++else
++ CFLAGS += -Wno-maybe-uninitialized
++endif
+ BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) $(ARCH_INCLUDES)
+
+ CONFIGMK := $(LIB_DIR)/../config.mk
+--
+2.43.0
+