Re: [PATCH v4 18/30] tools: iio: Append extra cflags

From: Jonathan Cameron

Date: Sun Mar 22 2026 - 08:00:45 EST


On Wed, 11 Mar 2026 08:29:43 +0000
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>
Given discussion leading to:
https://lore.kernel.org/all/20260311113537.70c4bacd2021c8d29c7dcf68@xxxxxxxxxxxxxxxxxxxx/
I'm assuming I don't need to do anything beyond.

Acked-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>

Shout if otherwise.

> ---
> tools/iio/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/iio/Makefile b/tools/iio/Makefile
> index 3bcce0b7d10f42208765be83dac047faa2e0ceb1..f0428421792d1cbe5ff71b01b67f23eb908fa714 100644
> --- a/tools/iio/Makefile
> +++ b/tools/iio/Makefile
> @@ -13,6 +13,7 @@ endif
> MAKEFLAGS += -r
>
> override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
> +override CFLAGS += $(EXTRA_CFLAGS)
>
> ALL_TARGETS := iio_event_monitor lsiio iio_generic_buffer
> ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
>