[PATCH v3 20/30] tools: power: acpi: Append extra cflags

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

diff --git a/tools/power/acpi/Makefile.config b/tools/power/acpi/Makefile.config
index cd7106876a5f39dfda38e286c54c3a7c268b34a2..4978c06828af7b0f47e533735ad82c962b7e0765 100644
--- a/tools/power/acpi/Makefile.config
+++ b/tools/power/acpi/Makefile.config
@@ -67,6 +67,7 @@ WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
 
 KERNEL_INCLUDE := $(OUTPUT)include
 ACPICA_INCLUDE := $(srctree)/../../../drivers/acpi/acpica
+CFLAGS += $(EXTRA_CFLAGS)
 CFLAGS += -D_LINUX -I$(KERNEL_INCLUDE) -I$(ACPICA_INCLUDE)
 CFLAGS += $(WARNINGS)
 MKDIR = mkdir

-- 
2.34.1
Re: [PATCH v3 20/30] tools: power: acpi: 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/acpi/Makefile.config | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/power/acpi/Makefile.config b/tools/power/acpi/Makefile.config
> index cd7106876a5f39dfda38e286c54c3a7c268b34a2..4978c06828af7b0f47e533735ad82c962b7e0765 100644
> --- a/tools/power/acpi/Makefile.config
> +++ b/tools/power/acpi/Makefile.config
> @@ -67,6 +67,7 @@ WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
>
>  KERNEL_INCLUDE := $(OUTPUT)include
>  ACPICA_INCLUDE := $(srctree)/../../../drivers/acpi/acpica
> +CFLAGS += $(EXTRA_CFLAGS)
>  CFLAGS += -D_LINUX -I$(KERNEL_INCLUDE) -I$(ACPICA_INCLUDE)
>  CFLAGS += $(WARNINGS)

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

Thanks,
Ian

>  MKDIR = mkdir
>
> --
> 2.34.1
>