diff mbox series

[meta-oe] mcpp: Stick to C17

Message ID 20250401100832.1477718-1-mark.yang@lge.com
State Accepted
Headers show
Series [meta-oe] mcpp: Stick to C17 | expand

Commit Message

mark yang April 1, 2025, 10:08 a.m. UTC
From: "mark.yang" <mark.yang@lge.com>

* Fix build error with gcc-15 by renaming goto labels
  see more details:
  http://errors.yoctoproject.org/Errors/Details/850149/
  ../../mcpp-2.7.2/src/system.c:3436:15: error: expected identifier or '*' before 'true'

  true, false are reserved keywords in gcc-15
  Rename goto 'labels' from 'ture' to 'true_label', from 'false' 'false_label' to avoid conflicts.

Signed-off-by: mark.yang <mark.yang@lge.com>
---
 meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Khem Raj April 1, 2025, 2:24 p.m. UTC | #1
On Tue, Apr 1, 2025 at 3:08 AM mark.yang via lists.openembedded.org
<mark.yang=lge.com@lists.openembedded.org> wrote:
>
> From: "mark.yang" <mark.yang@lge.com>
>
> * Fix build error with gcc-15 by renaming goto labels
>   see more details:
>   http://errors.yoctoproject.org/Errors/Details/850149/
>   ../../mcpp-2.7.2/src/system.c:3436:15: error: expected identifier or '*' before 'true'
>
>   true, false are reserved keywords in gcc-15
>   Rename goto 'labels' from 'ture' to 'true_label', from 'false' 'false_label' to avoid conflicts.

It might be worth using true/false conditionally e.g. see
https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch

>
> Signed-off-by: mark.yang <mark.yang@lge.com>
> ---
>  meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
> index 0c1815732f..dfa77770a7 100644
> --- a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
> +++ b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
> @@ -21,3 +21,7 @@ BBCLASSEXTEND = "native nativesdk"
>  # http://errors.yoctoproject.org/Errors/Details/766883/
>  # mcpp-2.7.2/src/expand.c:713:21: error: assignment to 'char *' from incompatible pointer type 'LOCATION *' {aka 'struct location *'} [-Wincompatible-pointer-types]
>  CFLAGS += "-Wno-error=incompatible-pointer-types"
> +
> +# http://errors.yoctoproject.org/Errors/Details/850149/
> +# ../../mcpp-2.7.2/src/system.c:3436:15: error: expected identifier or '*' before 'true'
> +CFLAGS += "-std=gnu17"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#116470): https://lists.openembedded.org/g/openembedded-devel/message/116470
> Mute This Topic: https://lists.openembedded.org/mt/112022139/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
index 0c1815732f..dfa77770a7 100644
--- a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
+++ b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb
@@ -21,3 +21,7 @@  BBCLASSEXTEND = "native nativesdk"
 # http://errors.yoctoproject.org/Errors/Details/766883/
 # mcpp-2.7.2/src/expand.c:713:21: error: assignment to 'char *' from incompatible pointer type 'LOCATION *' {aka 'struct location *'} [-Wincompatible-pointer-types]
 CFLAGS += "-Wno-error=incompatible-pointer-types"
+
+# http://errors.yoctoproject.org/Errors/Details/850149/
+# ../../mcpp-2.7.2/src/system.c:3436:15: error: expected identifier or '*' before 'true'
+CFLAGS += "-std=gnu17"