diff options
author | Paran Lee <[email protected]> | 2023-03-15 14:15:01 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-05-12 15:21:48 -0300 |
commit | 2d4c53973f014983d59a7aa4e980007db315fee0 (patch) | |
tree | 04aa5265c9a3bad81fd2fcace7412e1fc7e15ac3 | |
parent | 760ebc45746b498a36332acefd9e2838a3f8fcf0 (diff) |
perf tools riscv: Add support for riscv lookup_binutils_path
Add RISC-V binutils path on lookup triplets.
Reviewed-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Paran Lee <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Acked-by: Palmer Dabbelt <[email protected]>
Cc: Albert Ou <[email protected]>
Cc: Anton Blanchard <[email protected]>
Cc: Daniel Axtens <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Palmer Dabbelt <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/arch/common.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c index b951374bc49d..4908d54dd33b 100644 --- a/tools/perf/arch/common.c +++ b/tools/perf/arch/common.c @@ -43,6 +43,20 @@ const char *const powerpc_triplets[] = { 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[] = { "s390-ibm-linux-", "s390x-linux-gnu-", @@ -164,6 +178,10 @@ static int perf_env__lookup_binutils_path(struct perf_env *env, path_list = arm64_triplets; else if (!strcmp(arch, "powerpc")) 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")) path_list = sh_triplets; else if (!strcmp(arch, "s390")) |