1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

mips: Add '-std=gnu11' to vdso CFLAGS

Integrating the following commit(s) to linux-yocto/6.12:

1/1 [
    Author: Khem Raj
    Email: raj.khem@gmail.com
    Subject: mips: Add '-std=gnu11' to vdso CFLAGS
    Date: Wed, 26 Mar 2025 20:24:36 -0700

    GCC 15 changed the default C standard dialect from gnu17 to gnu23,
    which should not have impacted the kernel because it explicitly requests
    the gnu11 standard in the main Makefile. However, mips/vdso code uses
    its own CFLAGS without a '-std=' value, which break with this dialect
    change because of the kernel's own definitions of bool, false, and true
    conflicting with the C23 reserved keywords.

      include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant
         11 |         false   = 0,
            |         ^~~~~
      include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards
      include/linux/types.h:35:33: error: 'bool' cannot be defined via 'typedef'
         35 | typedef _Bool                   bool;
            |                                 ^~~~
      include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23' onwards

    Add '-std=gnu11' to the decompressor and purgatory CFLAGS to eliminate
    these errors and make the C standard version of these areas match the
    rest of the kernel.

    Signed-off-by: Khem Raj <raj.khem@gmail.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]

(From OE-Core rev: adf40ca85d4de9257da2667f254b967f391c8a50)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Bruce Ashfield
2025-04-10 14:55:36 -04:00
committed by Richard Purdie
parent 43092d6e8d
commit 7607a984fd
3 changed files with 13 additions and 13 deletions
@@ -17,7 +17,7 @@ DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
SRCREV_machine ?= "b2c792d89ac51b1147810021dddab1e9f38ade9c"
SRCREV_machine ?= "2ee7ebed771b39a795c227aae81524175abf5d00"
SRCREV_meta ?= "d034c1073cb7f88eaf3ce929ba21ba11503729b2"
PV = "${LINUX_VERSION}+git"