Skip to contentSkip to conversation

Backport perf makefile fix to linux-6.6.y

DISCUSSION Alexis Lothoré 2 participants 4 messages Jul 9, 2025 Stable branch

lore
Share & tools
lore
#0 lore raw

Hello stable team,

could you please backport commit 440cf77625e3 ("perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation") to linux-6.6.y ?

Its absence prevents some people from building the perf tool in cross-compile environment with this kernel. The patch applies cleanly on linux-6.6.y

Thanks,

Alexis

Signature · 3 lines
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
maintainer
#1 lore raw
Quoted 7 lines · Alexis Lothoré

Hello stable team,

could you please backport commit 440cf77625e3 ("perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation") to linux-6.6.y ?

Its absence prevents some people from building the perf tool in cross-compile environment with this kernel. The patch applies cleanly on linux-6.6.y

Is this a regression from older kernels that was broken in 6.6.y, or is this a new feature? If a new feature, why not just use perf from a newer kernel version instead?

thanks,

greg k-h

#2 lore raw
Quoted 6 lines · Greg KH
Quoted 5 lines · Alexis Lothoré

Hello stable team,

could you please backport commit 440cf77625e3 ("perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation") to linux-6.6.y ?

Quoted 6 lines
Quoted 2 lines

Its absence prevents some people from building the perf tool in cross-compile environment with this kernel. The patch applies cleanly on linux-6.6.y

Is this a regression from older kernels that was broken in 6.6.y, or is this a new feature? If a new feature, why not just use perf from a newer kernel version instead?

I manage to build perf with a 5.15.x kernel, while I can't in 6.6 (with the same parameters), so yes, I would call it a regression.
To clarify my wording, when I say that missing this patch prevents from building perf, it actually _breaks_ perf build, when trying to build it with libtraceevent support:

In file included from /home/alexis/src/buildroot/output/build/linux-6.6.94/tools/perf//util/session.h:5,

                 from builtin-c2c.c:29:

/home/alexis/src/buildroot/output/build/linux-6.6.94/tools/perf//util/trace-event.h:149:62: error: operator '&&' has no right operand
149 | #if defined(LIBTRACEEVENT_VERSION) && LIBTRACEEVENT_VERSION >= MAKE_LIBTRACEEVENT_VERSION(1, 5, 0)

Alexis

Quoted 3 lines

thanks,

greg k-h

Signature · 3 lines
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
maintainer
#3 lore raw
Quoted 20 lines · Alexis Lothoré
Quoted 6 lines · Greg KH
Quoted 5 lines · Alexis Lothoré

Hello stable team,

could you please backport commit 440cf77625e3 ("perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation") to linux-6.6.y ?

Quoted 6 lines
Quoted 2 lines

Its absence prevents some people from building the perf tool in cross-compile environment with this kernel. The patch applies cleanly on linux-6.6.y

Is this a regression from older kernels that was broken in 6.6.y, or is this a new feature? If a new feature, why not just use perf from a newer kernel version instead?

I manage to build perf with a 5.15.x kernel, while I can't in 6.6 (with the same parameters), so yes, I would call it a regression.
To clarify my wording, when I say that missing this patch prevents from building perf, it actually _breaks_ perf build, when trying to build it with libtraceevent support:

Quoted 4 lines

In file included from /home/alexis/src/buildroot/output/build/linux-6.6.94/tools/perf//util/session.h:5,

                 from builtin-c2c.c:29:

/home/alexis/src/buildroot/output/build/linux-6.6.94/tools/perf//util/trace-event.h:149:62: error: operator '&&' has no right operand
149 | #if defined(LIBTRACEEVENT_VERSION) && LIBTRACEEVENT_VERSION >= MAKE_LIBTRACEEVENT_VERSION(1, 5, 0)

Fair enough, thanks!

Note, I never can seem to build perf in the "older" LTS kernels, so I'm amazed it works at all for you :)

I'll queue this up after this round of releases goes out later this week.

greg k-h