Skip to contentSkip to conversation

libbpf: Use $(SRCARCH) for include path

PATCH In review Shile Zhang 2 participants 3 messages Dec 27, 2019 – Dec 30, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libbpf: Use $(SRCARCH) for include path

To include right x86 centric include path for ARCH=x86_64.

---
 tools/lib/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/Makefile +1 -1
index defae23a0169..197d96886303 100644
@@ -59,7 +59,7 @@ FEATURE_USER = .libbpf
 FEATURE_TESTS = libelf libelf-mmap bpf reallocarray
 FEATURE_DISPLAY = libelf bpf
 
-INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
+INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi -I$(srctree)/tools/include/uapi
 FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
 
 check_feat := 1
Signature · 1 line
2.24.0.rc2
#1 lore raw
Quoted 13 lines · Shile Zhang

To include right x86 centric include path for ARCH=x86_64.

---
 tools/lib/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/Makefile +0 -0
index defae23a0169..197d96886303 100644

tools/lib/bpf/Makefile FEATURE_USER = .libbpf · line 62

Quoted 5 lines
tools/lib/bpf/Makefile +1 -1
@@ -59,7 +59,7 @@ FEATURE_USER = .libbpf
 FEATURE_TESTS = libelf libelf-mmap bpf reallocarray
 FEATURE_DISPLAY = libelf bpf
 
-INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
+INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi -I$(srctree)/tools/include/uapi

Is this breaking anything at all right now? I just tried removing arch-specific include and everything still compiled successfully. So maybe instead let's just drop arch-specific include path?

Quoted 6 lines
tools/lib/bpf/Makefile +0 -1
 FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
 
 check_feat := 1
--

2.24.0.rc2

#2 lore raw
Quoted 17 lines · Andrii Nakryiko
Quoted 15 lines · Shile Zhang

To include right x86 centric include path for ARCH=x86_64.

---
  tools/lib/bpf/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/Makefile +0 -0
index defae23a0169..197d96886303 100644
@@ -59,7 +59,7 @@ FEATURE_USER = .libbpf
  FEATURE_TESTS = libelf libelf-mmap bpf reallocarray
  FEATURE_DISPLAY = libelf bpf
 
Quoted 6 lines

tools/lib/bpf/Makefile FEATURE_USER = .libbpf · line 62

Quoted 2 lines
tools/lib/bpf/Makefile +1 -1
-INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
+INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi -I$(srctree)/tools/include/uapi

Is this breaking anything at all right now? I just tried removing arch-specific include and everything still compiled successfully. So maybe instead let's just drop arch-specific include path?

No compile error/warning, but just include wrong (non-existed) include path. I think it's OK to drop it if that path is needless.

Thanks!

Quoted 6 lines
Quoted 6 lines
tools/lib/bpf/Makefile +0 -1
  FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
 
  check_feat := 1
--

2.24.0.rc2