Re: [PATCH v3 28/30] selftests/hid: Append extra cflags
From: Ian Rogers
Date: Mon Mar 09 2026 - 14:12:53 EST
On Sun, Mar 8, 2026 at 9:50 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/testing/selftests/hid/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/hid/Makefile b/tools/testing/selftests/hid/Makefile
> index 50ec9e0406abaf316fba232c5da1967e27d0fa9b..d0dfa411af9b56ea3458184b8a81ef61bd44b1fe 100644
> --- a/tools/testing/selftests/hid/Makefile
> +++ b/tools/testing/selftests/hid/Makefile
> @@ -24,6 +24,7 @@ CXX ?= $(CROSS_COMPILE)g++
>
> HOSTPKG_CONFIG := pkg-config
>
> +CFLAGS += $(EXTRA_CFLAGS)
> CFLAGS += -g -O0 -rdynamic -Wall -Werror -I$(OUTPUT)
> CFLAGS += -I$(OUTPUT)/tools/include
The append should probably happen last to allow the default values to
be overridden.
Thanks,
Ian
>
> --
> 2.34.1
>