Re: [PATCH v3 16/30] tools: iio: Append extra cflags
From: Ian Rogers
Date: Mon Mar 09 2026 - 14:05:35 EST
On Sun, Mar 8, 2026 at 9:48 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/iio/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/iio/Makefile b/tools/iio/Makefile
> index 3bcce0b7d10f42208765be83dac047faa2e0ceb1..c189af6286751d141348957e4d63d33b87410381 100644
> --- a/tools/iio/Makefile
> +++ b/tools/iio/Makefile
> @@ -12,6 +12,7 @@ endif
> # (this improves performance and avoids hard-to-debug behaviour);
> MAKEFLAGS += -r
>
> +override CFLAGS += $(EXTRA_CFLAGS)
> override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
The append should probably happen last to allow the default values to
be overridden.
Thanks,
Ian
> ALL_TARGETS := iio_event_monitor lsiio iio_generic_buffer
>
> --
> 2.34.1
>