Re: [PATCH v2 1/2] perf build: Update build rule for generated files

From: Namhyung Kim
Date: Wed Aug 09 2023 - 02:56:33 EST


Hi Arnaldo,

On Fri, Jul 28, 2023 at 11:09 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> Em Thu, Jul 27, 2023 at 07:24:46PM -0700, Namhyung Kim escreveu:
> > The bison and flex generate C files from the source (.y and .l)
> > files. When O= option is used, they are saved in a separate directory
> > but the default build rule assumes the .C files are in the source
> > directory. So it might read invalid file if there are generated files
> > from an old version. The same is true for the pmu-events files.
> >
> > For example, the following command would cause a build failure:
> >
> > $ git checkout v6.3
> > $ make -C tools/perf # build in the same directory
> >
> > $ git checkout v6.5-rc2
> > $ mkdir build # create a build directory
> > $ make -C tools/perf O=build # build in a different directory but it
> > # refers files in the source directory
> >
> > Let's update the build rule to specify those cases explicitly to depend
> > on the files in the output directory.
> >
> > Note that it's not a complete fix and it needs the next patch for the
> > include path too.
>
> Applied, testing it on the container builds.

I don't see these commits in the perf-tools{,-next} yet.

Thanks,
Namhyung