linux/tools/build
Tiezhu Yang a4a5d4ee06 libbpf: Add __NR_bpf definition for LoongArch
LoongArch uses the generic syscall table, where __NR_bpf is defined
as 280 in include/uapi/asm-generic/unistd.h.

To align with other architectures, add the __NR_bpf definition for
LoongArch to avoid a potential compilation failure: "error __NR_bpf
not defined. libbpf does not support your arch."

This is a follow up patch of:

  commit b0c47807d3 ("bpf: Add sparc support to tools and samples.")
  commit bad1926dd2 ("bpf, s390: fix build for libbpf and selftest suite")
  commit ca31ca8247 ("tools/bpf: fix perf build error with uClibc (seen on ARC)")
  commit e32cb12ff5 ("bpf, mips: Fix build errors about __NR_bpf undeclared")

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260526063936.16769-1-yangtiezhu@loongson.cn
History 2026-05-28 14:38:15 -07:00
..
Documentation tools build: Add CFLAGS_REMOVE_* support 2016-11-14 11:37:25 -03:00
feature libbpf: Add __NR_bpf definition for LoongArch 2026-05-28 14:38:15 -07:00
tests License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Build tools build: Fix fixdep dependencies 2025-10-14 14:45:20 -07:00
Build.include tools build: Fix rust cross compilation 2026-03-04 11:37:30 -03:00
fixdep.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile perf build: Fix perf build issues with fixdep 2025-10-23 09:53:49 +02:00
Makefile.build tools build: Make in-target rule robust against too long argument error 2026-03-04 11:21:48 -03:00
Makefile.feature tools/build: Add feature test for libcheck 2026-03-04 15:51:56 +01:00
Makefile.include tools build: Correct bpf fixdep dependencies 2024-08-05 12:19:48 -03:00