Skip to content

Commit abc9eeb

Browse files
kxxtd-e-s-o
authored andcommitted
Fix __TARGET_ARCH_xx define for riscv64,loongarch64,sparc64,mips64
This commit updates the __TARGET_ARCH_xx define to match what is used in bpf_tracing.h. Reference https://github.com/torvalds/linux/blob/8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b/tools/lib/bpf/bpf_tracing.h#L8-L38
1 parent 704543e commit abc9eeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libbpf-cargo/src/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ fn compile_one(
192192
"aarch64" => "arm64",
193193
"powerpc64" => "powerpc",
194194
"s390x" => "s390",
195+
"riscv64" => "riscv",
196+
"loongarch64" => "loongarch",
197+
"sparc64" => "sparc",
198+
"mips64" => "mips",
195199
x => x,
196200
};
197201
cmd.arg(format!("-D__TARGET_ARCH_{arch}"));

0 commit comments

Comments
 (0)