summaryrefslogtreecommitdiffstats
path: root/build/external/patches/xdp-tools_1.2.9
diff options
context:
space:
mode:
Diffstat (limited to 'build/external/patches/xdp-tools_1.2.9')
-rw-r--r--build/external/patches/xdp-tools_1.2.9/0001-libxdp-add-fPIC-with-static-lib-build.patch26
-rw-r--r--build/external/patches/xdp-tools_1.2.9/0002-libxdp-fix-asm-types.h-file-not-found-issue.patch32
-rw-r--r--build/external/patches/xdp-tools_1.2.9/0003-libxdp-fix-maybe-uninitialized-compiler-warning.patch26
3 files changed, 84 insertions, 0 deletions
diff --git a/build/external/patches/xdp-tools_1.2.9/0001-libxdp-add-fPIC-with-static-lib-build.patch b/build/external/patches/xdp-tools_1.2.9/0001-libxdp-add-fPIC-with-static-lib-build.patch
new file mode 100644
index 00000000000..98b85a2711a
--- /dev/null
+++ b/build/external/patches/xdp-tools_1.2.9/0001-libxdp-add-fPIC-with-static-lib-build.patch
@@ -0,0 +1,26 @@
+From e83f80443a2f23a68037bf4c7ba16b3723d193a4 Mon Sep 17 00:00:00 2001
+From: Yulong <yulong.pei@intel.com>
+Date: Tue, 3 Jan 2023 14:16:17 +0000
+Subject: [PATCH] libxdp: add fPIC with static lib build
+
+Signed-off-by: Yulong <yulong.pei@intel.com>
+---
+ lib/libxdp/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
+index 358b751..a9bb414 100644
+--- a/lib/libxdp/Makefile
++++ b/lib/libxdp/Makefile
+@@ -88,7 +88,7 @@ $(SHARED_OBJDIR):
+ $(Q)mkdir -p $(SHARED_OBJDIR)
+
+ $(STATIC_OBJDIR)/%.o: %.c $(EXTRA_LIB_DEPS) | $(STATIC_OBJDIR)
+- $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) -D LIBXDP_STATIC=1 -Wall -I../../headers -c $< -o $@
++ $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -D LIBXDP_STATIC=1 -Wall -I../../headers -c $< -o $@
+
+ $(SHARED_OBJDIR)/%.o: %.c $(EXTRA_LIB_DEPS) | $(SHARED_OBJDIR)
+ $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(SHARED_CFLAGS) -Wall -I../../headers -c $< -o $@
+--
+2.25.1
+
diff --git a/build/external/patches/xdp-tools_1.2.9/0002-libxdp-fix-asm-types.h-file-not-found-issue.patch b/build/external/patches/xdp-tools_1.2.9/0002-libxdp-fix-asm-types.h-file-not-found-issue.patch
new file mode 100644
index 00000000000..1ba3cc5418e
--- /dev/null
+++ b/build/external/patches/xdp-tools_1.2.9/0002-libxdp-fix-asm-types.h-file-not-found-issue.patch
@@ -0,0 +1,32 @@
+From 51ea3b590f5e0a6b34b5148af43996029fd60ac6 Mon Sep 17 00:00:00 2001
+From: Yulong <yulong.pei@intel.com>
+Date: Fri, 6 Jan 2023 07:46:10 +0000
+Subject: [PATCH 2/2] libxdp: fix asm/types.h file not found issue
+
+The file asm/types.h located in /usr/include/$(uname -m)-linux-gnu,
+the path string already assigned to ARCH_INCLUDES when run xdp-tools
+configure, so include ARCH_INCLUDES to CFLAGS and BPF_CFLAGS directly.
+
+Signed-off-by: Yulong <yulong.pei@intel.com>
+---
+ lib/defines.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/defines.mk b/lib/defines.mk
+index f134c43..515411c 100644
+--- a/lib/defines.mk
++++ b/lib/defines.mk
+@@ -40,8 +40,8 @@ endif
+
+ DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+
+-CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES)
+-BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS))
++CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES) $(ARCH_INCLUDES)
++BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) $(ARCH_INCLUDES)
+
+ CONFIGMK := $(LIB_DIR)/../config.mk
+ LIBMK := Makefile $(CONFIGMK) $(LIB_DIR)/defines.mk $(LIB_DIR)/common.mk $(LIB_DIR)/../version.mk
+--
+2.25.1
+
diff --git a/build/external/patches/xdp-tools_1.2.9/0003-libxdp-fix-maybe-uninitialized-compiler-warning.patch b/build/external/patches/xdp-tools_1.2.9/0003-libxdp-fix-maybe-uninitialized-compiler-warning.patch
new file mode 100644
index 00000000000..6ab74171dc6
--- /dev/null
+++ b/build/external/patches/xdp-tools_1.2.9/0003-libxdp-fix-maybe-uninitialized-compiler-warning.patch
@@ -0,0 +1,26 @@
+From 3033b9bdbcdb270f15373b27933d554f847e01d4 Mon Sep 17 00:00:00 2001
+From: Yulong <yulong.pei@intel.com>
+Date: Fri, 6 Jan 2023 14:31:24 +0000
+Subject: [PATCH 3/3] libxdp: fix maybe-uninitialized compiler warning
+
+Signed-off-by: Yulong <yulong.pei@intel.com>
+---
+ lib/common.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/common.mk b/lib/common.mk
+index 56c0406..f7a88a1 100644
+--- a/lib/common.mk
++++ b/lib/common.mk
+@@ -101,7 +101,7 @@ $(LIB_OBJS): %.o: %.c %.h $(LIB_H)
+
+ ALL_EXEC_TARGETS=$(USER_TARGETS) $(TEST_TARGETS)
+ $(ALL_EXEC_TARGETS): %: %.c $(OBJECT_LIBBPF) $(OBJECT_LIBXDP) $(LIBMK) $(LIB_OBJS) $(KERN_USER_H) $(EXTRA_DEPS) $(EXTRA_USER_DEPS)
+- $(QUIET_CC)$(CC) -Wall $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(LIB_OBJS) \
++ $(QUIET_CC)$(CC) -Wall -Wno-maybe-uninitialized $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(LIB_OBJS) \
+ $< $(LDLIBS)
+
+ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) $(BPF_HEADERS) $(LIBMK)
+--
+2.25.1
+