[PATCH] Makefile: define C language standard to "gnu11"

Anup Patel anup at brainfault.org
Sun Nov 30 22:34:08 PST 2025


On Thu, Nov 13, 2025 at 1:46 PM Vladimir Kondratiev
<vladimir.kondratiev at mobileye.com> wrote:
>
> C language standard was not specified, implying default that is
> depending on the compiler version. Force "gnu11", same as for the
> Linux kernel
>
> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev at mobileye.com>

LGTM.

Reviewed-by: Anup Patel <anup at brainfault.org>

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index 398eabe8c964..9aa7f060f51c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -374,6 +374,7 @@ GENFLAGS    +=      $(firmware-genflags-y)
>  CFLAGS         =       -g -Wall -Werror -ffreestanding -nostdlib -fno-stack-protector -fno-strict-aliasing -ffunction-sections -fdata-sections
>  CFLAGS         +=      -fno-omit-frame-pointer -fno-optimize-sibling-calls
>  CFLAGS         +=      -fno-asynchronous-unwind-tables -fno-unwind-tables
> +CFLAGS         +=      -std=gnu11
>  CFLAGS         +=      $(REPRODUCIBLE_FLAGS)
>  # Optionally supported flags
>  ifeq ($(CC_SUPPORT_VECTOR),y)
> --
> 2.43.0
>



More information about the opensbi mailing list