Re: [PATCH v3 22/30] tools: sched_ext: Append extra cflags

From: Ian Rogers

Date: Mon Mar 09 2026 - 14:13:07 EST


On Sun, Mar 8, 2026 at 9:49 AM Leo Yan <leo.yan@xxxxxxx> wrote:
>
> Append EXTRA_CFLAGS to CFLAGS so that additional flags can be applied to
> the compiler.
>
> Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
> ---
> tools/sched_ext/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/sched_ext/Makefile b/tools/sched_ext/Makefile
> index 21554f0896923fa9c2e5b98c85d65d964152e592..7b97af037ae55981bc84d4a9140766fdf4c62a6c 100644
> --- a/tools/sched_ext/Makefile
> +++ b/tools/sched_ext/Makefile
> @@ -89,6 +89,7 @@ ifneq ($(wildcard $(GENHDR)),)
> GENFLAGS := -DHAVE_GENHDR
> endif
>
> +CFLAGS += $(EXTRA_CFLAGS)
> CFLAGS += -g -O2 -rdynamic -pthread -Wall -Werror $(GENFLAGS) \
> -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR) \
> -I$(TOOLSINCDIR) -I$(APIDIR) -I$(CURDIR)/include

The append should probably happen last to allow the default values to
be overridden.

Thanks,
Ian

> --
> 2.34.1
>