[PATCH v3 21/30] tools: power: x86/intel-speed-select: Append extra cflags

Leo Yan posted 30 patches 1 month ago
There is a newer version of this series
[PATCH v3 21/30] tools: power: x86/intel-speed-select: 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/power/x86/intel-speed-select/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/power/x86/intel-speed-select/Makefile b/tools/power/x86/intel-speed-select/Makefile
index 6b299aae2ded89c3a70a3649996e258b98001ee7..61d6e81f3cf1d6427addb4f31c1369ac663ba3d6 100644
--- a/tools/power/x86/intel-speed-select/Makefile
+++ b/tools/power/x86/intel-speed-select/Makefile
@@ -19,6 +19,7 @@ ifeq ($(NL3_CFLAGS),)
 NL3_CFLAGS = -I/usr/include/libnl3
 endif
 
+override CFLAGS += $(EXTRA_CFLAGS)
 override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include $(NL3_CFLAGS)
 override LDFLAGS += -lnl-genl-3 -lnl-3
 

-- 
2.34.1
Re: [PATCH v3 21/30] tools: power: x86/intel-speed-select: Append extra cflags
Posted by Ian Rogers 1 month ago
On Sun, Mar 8, 2026 at 9:49 AM 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>
> ---
>  tools/power/x86/intel-speed-select/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/power/x86/intel-speed-select/Makefile b/tools/power/x86/intel-speed-select/Makefile
> index 6b299aae2ded89c3a70a3649996e258b98001ee7..61d6e81f3cf1d6427addb4f31c1369ac663ba3d6 100644
> --- a/tools/power/x86/intel-speed-select/Makefile
> +++ b/tools/power/x86/intel-speed-select/Makefile
> @@ -19,6 +19,7 @@ ifeq ($(NL3_CFLAGS),)
>  NL3_CFLAGS = -I/usr/include/libnl3
>  endif
>
> +override CFLAGS += $(EXTRA_CFLAGS)
>  override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include $(NL3_CFLAGS)

The append should probably happen last to allow the default values to
be overridden.

Thanks,
Ian

>  override LDFLAGS += -lnl-genl-3 -lnl-3
>
>
> --
> 2.34.1
>
Re: [PATCH v3 21/30] tools: power: x86/intel-speed-select: Append extra cflags
Posted by srinivas pandruvada 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>
    Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
>  tools/power/x86/intel-speed-select/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/power/x86/intel-speed-select/Makefile
> b/tools/power/x86/intel-speed-select/Makefile
> index
> 6b299aae2ded89c3a70a3649996e258b98001ee7..61d6e81f3cf1d6427addb4f31c1
> 369ac663ba3d6 100644
> --- a/tools/power/x86/intel-speed-select/Makefile
> +++ b/tools/power/x86/intel-speed-select/Makefile
> @@ -19,6 +19,7 @@ ifeq ($(NL3_CFLAGS),)
>  NL3_CFLAGS = -I/usr/include/libnl3
>  endif
>  
> +override CFLAGS += $(EXTRA_CFLAGS)
>  override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
> $(NL3_CFLAGS)
>  override LDFLAGS += -lnl-genl-3 -lnl-3
>