Skip to content

Commit b533aaf

Browse files
committed
cmake: Fix eBPF include path for all arches
Fix eBPF include path for all arches by using corresponding cmake variable. That works for all multi arch systems. Link: xdp-project/xdp-tools#4 Link: xdp-project/xdp-tools#408 Signed-off-by: Kurt Kanzenbach <[email protected]> Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
1 parent c200f0a commit b533aaf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ include_directories("${PROJECT_BINARY_DIR}")
121121
#
122122
# Add code for compiling XDP eBPF programes.
123123
#
124-
execute_process(COMMAND uname -m OUTPUT_VARIABLE BUILD_ARCH ERROR_QUIET)
125-
string(STRIP "${BUILD_ARCH}" BUILD_ARCH)
126-
set(ASM_INCLUDE "/usr/include/${BUILD_ARCH}-linux-gnu")
124+
set(ASM_INCLUDE "/usr/include/${CMAKE_C_LIBRARY_ARCHITECTURE}")
127125
set(CLANG_FLAGS -S --target=bpf -D __BPF_TRACING__ -Wall -O2 -fno-stack-protector -emit-llvm -g -I ${ASM_INCLUDE})
128126
set(LLC_FLAGS -march=bpf -filetype=obj)
129127

0 commit comments

Comments
 (0)