diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-06-22 21:04:06 +0200 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-07-21 07:33:06 +0000 |
commit | 9c1f78d3e599a62b64a943297ff8693b4b6cacd7 (patch) | |
tree | e108c2b554d4888dfc3714154659585ae716127f /src | |
parent | 86dfcb80ce7808103b014ad4cbfc80ecc7a5d355 (diff) |
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 <arthur@aheymans.xyz>
Change-Id: I5d445d151db5e6cc7b6e13bf74ce81007d819f1d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76007
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/acpi/acpigen.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |