Re: [PATCH] libperf: Don't remove -g when EXTRA_CFLAGS are used

From: Namhyung Kim
Date: Thu Mar 20 2025 - 12:01:57 EST


On Wed, 19 Mar 2025 11:40:09 +0000, James Clark wrote:
> When using EXTRA_CFLAGS, for example "EXTRA_CFLAGS=-DREFCNT_CHECKING=1",
> this construct stops setting -g which you'd expect would not be affected
> by adding extra flags. Additionally, EXTRA_CFLAGS should be the last
> thing to be appended so that it can be used to undo any defaults. And no
> condition is required, just += appends to any existing CFLAGS and also
> appends or doesn't append EXTRA_CFLAGS if they are or aren't set.
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung