Re: [PATCH bpf-next v2 5/8] tools/bpf: build: Append extra cflags
From: Ihor Solodrai
Date: Fri Jun 12 2026 - 21:10:21 EST
On 6/2/26 7:47 AM, Leo Yan 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/bpf/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile
> index fd2585af1252669c59228af3a77320e449e1a1ab..9c19e81f3c274767c3b9b94c907cbbe3ce9fe78c 100644
> --- a/tools/bpf/Makefile
> +++ b/tools/bpf/Makefile
> @@ -11,6 +11,7 @@ INSTALL ?= install
> CFLAGS += -Wall -O2
> CFLAGS += -D__EXPORTED_HEADERS__ -I$(srctree)/tools/include/uapi \
> -I$(srctree)/tools/include
> +CFLAGS += $(EXTRA_CFLAGS)
Acked-by: Ihor Solodrai <ihor.solodrai@xxxxxxxxx>
>
> # This will work when bpf is built in tools env. where srctree
> # isn't set and when invoked from selftests build, where srctree
>