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

Leo Yan posted 30 patches 4 weeks ago
There is a newer version of this series
[PATCH v4 18/30] tools: iio: Append extra cflags
Posted by Leo Yan 4 weeks ago
Append EXTRA_CFLAGS to CFLAGS so that additional flags can be applied to
the compiler.

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
 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))

-- 
2.34.1
Re: [PATCH v4 18/30] tools: iio: Append extra cflags
Posted by Jonathan Cameron 2 weeks, 3 days ago
On Wed, 11 Mar 2026 08:29:43 +0000
Leo Yan <leo.yan@arm.com> wrote:

> Append EXTRA_CFLAGS to CFLAGS so that additional flags can be applied to
> the compiler.
> 
> Signed-off-by: Leo Yan <leo.yan@arm.com>
Given discussion leading to:
https://lore.kernel.org/all/20260311113537.70c4bacd2021c8d29c7dcf68@linux-foundation.org/
I'm assuming I don't need to do anything beyond.

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

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))
>