[PATCH] tools/perf: Fix compiling with libelf on rv32

Arnaldo Carvalho de Melo acme at kernel.org
Wed Apr 17 08:59:15 PDT 2024


On Tue, Apr 16, 2024 at 08:04:55AM -0700, Ian Rogers wrote:
> On Mon, Apr 15, 2024 at 2:57 AM <cp0613 at linux.alibaba.com> wrote:
> >
> > From: Chen Pei <cp0613 at linux.alibaba.com>
> >
> > When cross-compiling perf with libelf, the following error occurred:
> >
> >         In file included from tests/genelf.c:14:
> >         tests/../util/genelf.h:50:2: error: #error "unsupported architecture"
> >         50 | #error "unsupported architecture"
> >                 |  ^~~~~
> >         tests/../util/genelf.h:59:5: warning: "GEN_ELF_CLASS" is not defined, evaluates to 0 [-Wundef]
> >         59 | #if GEN_ELF_CLASS == ELFCLASS64
> >
> > Fix this by adding GEN-ELF-ARCH and GEN-ELF-CLASS definitions for rv32.
> >
> > Signed-off-by: Chen Pei <cp0613 at linux.alibaba.com>
> 
> Reviewed-by: Ian Rogers <irogers at google.com>

Thanks, applied to perf-tools-next,

- Arnaldo



More information about the linux-riscv mailing list