[PATCH v3 26/30] tools: verification: Append extra cflags

Leo Yan posted 30 patches 1 month ago
There is a newer version of this series
[PATCH v3 26/30] tools: verification: Append extra cflags
Posted by Leo Yan 1 month 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/verification/rv/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/verification/rv/Makefile b/tools/verification/rv/Makefile
index 5b898360ba4818b12e8a16c27bd88c75d0076fb9..2882f0e93dca03b31d790b42d2ee3d8f73cc5c8b 100644
--- a/tools/verification/rv/Makefile
+++ b/tools/verification/rv/Makefile
@@ -55,6 +55,7 @@ ifeq ($(config),1)
   include Makefile.config
 endif
 
+CFLAGS		+= $(EXTRA_CFLAGS)
 CFLAGS		+= $(INCLUDES) $(LIB_INCLUDES)
 
 export CFLAGS OUTPUT srctree

-- 
2.34.1
Re: [PATCH v3 26/30] tools: verification: Append extra cflags
Posted by Gabriele Monaco 1 month ago
On Sun, 2026-03-08 at 16:46 +0000, 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@arm.com>

Thanks, for the patch, however I don't think this is necessary for RV as
EXTRA_CFLAGS are already appended to CFLAGS elsewhere [1].

Makefile.rv is included after the various Makefile.include, so I presume that's
good to go for the new flags you're appending in this series.
I did a quick check and I see -fzero-init-padding-bits=all by just adding 05/30
of this series.

[1] -
https://elixir.bootlin.com/linux/v6.19.3/source/tools/verification/rv/Makefile.rv#L29

> ---
>  tools/verification/rv/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/verification/rv/Makefile b/tools/verification/rv/Makefile
> index
> 5b898360ba4818b12e8a16c27bd88c75d0076fb9..2882f0e93dca03b31d790b42d2ee3d8f73cc
> 5c8b 100644
> --- a/tools/verification/rv/Makefile
> +++ b/tools/verification/rv/Makefile
> @@ -55,6 +55,7 @@ ifeq ($(config),1)
>    include Makefile.config
>  endif
>  
> +CFLAGS		+= $(EXTRA_CFLAGS)
>  CFLAGS		+= $(INCLUDES) $(LIB_INCLUDES)
>  
>  export CFLAGS OUTPUT srctree
Re: [PATCH v3 26/30] tools: verification: Append extra cflags
Posted by Leo Yan 4 weeks, 1 day ago
On Mon, Mar 09, 2026 at 07:26:16AM +0100, Gabriele Monaco wrote:
> On Sun, 2026-03-08 at 16:46 +0000, 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@arm.com>
> 
> Thanks, for the patch, however I don't think this is necessary for RV as
> EXTRA_CFLAGS are already appended to CFLAGS elsewhere [1].
> 
> Makefile.rv is included after the various Makefile.include, so I presume that's
> good to go for the new flags you're appending in this series.
> I did a quick check and I see -fzero-init-padding-bits=all by just adding 05/30
> of this series.
> 
> [1] -
> https://elixir.bootlin.com/linux/v6.19.3/source/tools/verification/rv/Makefile.rv#L29

Thanks!  I will drop this one in next spin.