Commit 2d4c5397 authored by Paran Lee's avatar Paran Lee Committed by Arnaldo Carvalho de Melo

perf tools riscv: Add support for riscv lookup_binutils_path

Add RISC-V binutils path on lookup triplets.
Reviewed-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarParan Lee <p4ranlee@gmail.com>
Acked-by: default avatarIan Rogers <irogers@google.com>
Acked-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Anton Blanchard <anton@ozlabs.org>
Cc: Daniel Axtens <dja@axtens.net>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: linux-riscv@lists.infradead.org
Link: https://lore.kernel.org/r/20230315051500.13064-1-p4ranlee@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 760ebc45
...@@ -43,6 +43,20 @@ const char *const powerpc_triplets[] = { ...@@ -43,6 +43,20 @@ const char *const powerpc_triplets[] = {
NULL NULL
}; };
const char *const riscv32_triplets[] = {
"riscv32-unknown-linux-gnu-",
"riscv32-linux-android-",
"riscv32-linux-gnu-",
NULL
};
const char *const riscv64_triplets[] = {
"riscv64-unknown-linux-gnu-",
"riscv64-linux-android-",
"riscv64-linux-gnu-",
NULL
};
const char *const s390_triplets[] = { const char *const s390_triplets[] = {
"s390-ibm-linux-", "s390-ibm-linux-",
"s390x-linux-gnu-", "s390x-linux-gnu-",
...@@ -164,6 +178,10 @@ static int perf_env__lookup_binutils_path(struct perf_env *env, ...@@ -164,6 +178,10 @@ static int perf_env__lookup_binutils_path(struct perf_env *env,
path_list = arm64_triplets; path_list = arm64_triplets;
else if (!strcmp(arch, "powerpc")) else if (!strcmp(arch, "powerpc"))
path_list = powerpc_triplets; path_list = powerpc_triplets;
else if (!strcmp(arch, "riscv32"))
path_list = riscv32_triplets;
else if (!strcmp(arch, "riscv64"))
path_list = riscv64_triplets;
else if (!strcmp(arch, "sh")) else if (!strcmp(arch, "sh"))
path_list = sh_triplets; path_list = sh_triplets;
else if (!strcmp(arch, "s390")) else if (!strcmp(arch, "s390"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment