summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch
blob: 2e66783692404ea28621402f6409fa48c8afc187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 2840cf0b89497f545fae2eed7ece3f3c5fc558e3 Mon Sep 17 00:00:00 2001
From: Naveen Saini <naveen.kumar.saini@intel.com>
Date: Mon, 17 Oct 2022 15:50:34 +0800
Subject: [PATCH 2/4] Makefile: It does not detect libbpf header from sysroot

So adding sysroot headers path.

Upstream-Status: OE-Specific

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
 lib/common.mk       | 2 +-
 lib/libxdp/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/common.mk b/lib/common.mk
index 56c0406..ab0bad8 100644
--- a/lib/common.mk
+++ b/lib/common.mk
@@ -55,7 +55,7 @@ LIBXDP_SOURCES := $(wildcard $(LIBXDP_DIR)/*.[ch] $(LIBXDP_DIR)/*.in)
 KERN_USER_H ?= $(wildcard common_kern_user.h)
 
 CFLAGS += -I$(HEADER_DIR) -I$(LIB_DIR)/util $(ARCH_INCLUDES)
-BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES)
+BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) -I${STAGING_INCDIR}/
 
 BPF_HEADERS := $(wildcard $(HEADER_DIR)/bpf/*.h) $(wildcard $(HEADER_DIR)/xdp/*.h)
 
diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
index 358b751..8f459d8 100644
--- a/lib/libxdp/Makefile
+++ b/lib/libxdp/Makefile
@@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc
 TEMPLATED_SOURCES := xdp-dispatcher.c
 
 CFLAGS += -I$(HEADER_DIR)
-BPF_CFLAGS += -I$(HEADER_DIR)
+BPF_CFLAGS += -I$(HEADER_DIR) -I${STAGING_INCDIR}/
 
 
 ifndef BUILD_STATIC_ONLY
-- 
2.25.1