From 9c1f78d3e599a62b64a943297ff8693b4b6cacd7 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 22 Jun 2023 21:04:06 +0200 Subject: acpi/acpigen.c: Ignore compiler warning about stack overflowing With arm64 -Wstack-usage= is enabled which is triggered on any use of alloca(). Since this function basically works on x86 without wrecking things and causing massive stack consumption it's unlikely to cause problems on arm64. Signed-off-by: Arthur Heymans Change-Id: I5d445d151db5e6cc7b6e13bf74ce81007d819f1d Reviewed-on: https://review.coreboot.org/c/coreboot/+/76007 Reviewed-by: Nico Huber Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) Reviewed-by: Lean Sheng Tan --- src/acpi/acpigen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/acpi') diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index e61954fd7f..7ca4f021dd 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -1764,6 +1764,10 @@ void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *), size_t coun * bit 0: other functions than 0 are supported * bits 1-x: function x supported */ +/* On GCC aarch64 the compiler is worried about alloca() having unbounded stack usage. */ +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic ignored "-Wstack-usage=" +#endif static void acpigen_dsm_uuid_enum_functions(const struct dsm_uuid *id) { const size_t bytes = DIV_ROUND_UP(id->count, BITS_PER_BYTE); -- cgit v1.2.3