Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/unifdef: fix build with gcc 15
@ 2025-05-14 19:05 James Hilliard
  2025-05-17 19:07 ` Brandon Maier
  2025-05-18 14:41 ` Arnout Vandecappelle via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: James Hilliard @ 2025-05-14 19:05 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, James Hilliard

Add a patch fixing compilation on hosts with gcc 15.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 ...0002-Don-t-use-C23-constexpr-keyword.patch | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch

diff --git a/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch b/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch
new file mode 100644
index 0000000000..5b5c9690da
--- /dev/null
+++ b/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch
@@ -0,0 +1,60 @@
+From d616741e6b0d5b57b66447e85ad32b283b28adde Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 17 Nov 2024 01:26:27 +0000
+Subject: [PATCH] Don't use C23 constexpr keyword
+
+This fixes building with upcoming GCC 15 which defaults to -std=gnu23.
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+Upstream: https://github.com/fanf2/unifdef/pull/19
+---
+ unifdef.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/unifdef.c b/unifdef.c
+index dc145a2..4bd3bda 100644
+--- a/unifdef.c
++++ b/unifdef.c
+@@ -202,7 +202,7 @@ static int              depth;			/* current #if nesting */
+ static int              delcount;		/* count of deleted lines */
+ static unsigned         blankcount;		/* count of blank lines */
+ static unsigned         blankmax;		/* maximum recent blankcount */
+-static bool             constexpr;		/* constant #if expression */
++static bool             is_constexpr;		/* constant #if expression */
+ static bool             zerosyms;		/* to format symdepth output */
+ static bool             firstsym;		/* ditto */
+ 
+@@ -1086,7 +1086,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp)
+ 			*valp = (value[sym] != NULL);
+ 			lt = *valp ? LT_TRUE : LT_FALSE;
+ 		}
+-		constexpr = false;
++		is_constexpr = false;
+ 	} else if (!endsym(*cp)) {
+ 		debug("eval%d symbol", prec(ops));
+ 		sym = findsym(&cp);
+@@ -1103,7 +1103,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp)
+ 			lt = *valp ? LT_TRUE : LT_FALSE;
+ 			cp = skipargs(cp);
+ 		}
+-		constexpr = false;
++		is_constexpr = false;
+ 	} else {
+ 		debug("eval%d bad expr", prec(ops));
+ 		return (LT_ERROR);
+@@ -1170,10 +1170,10 @@ ifeval(const char **cpp)
+ 	long val = 0;
+ 
+ 	debug("eval %s", *cpp);
+-	constexpr = killconsts ? false : true;
++	is_constexpr = killconsts ? false : true;
+ 	ret = eval_table(eval_ops, &val, cpp);
+ 	debug("eval = %d", val);
+-	return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
++	return (is_constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
+ }
+ 
+ /*
+-- 
+2.34.1
+
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/unifdef: fix build with gcc 15
  2025-05-14 19:05 [Buildroot] [PATCH 1/1] package/unifdef: fix build with gcc 15 James Hilliard
@ 2025-05-17 19:07 ` Brandon Maier
  2025-05-18 14:41 ` Arnout Vandecappelle via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Brandon Maier @ 2025-05-17 19:07 UTC (permalink / raw)
  To: James Hilliard, buildroot; +Cc: Brandon Maier

On Wed May 14, 2025 at 2:05 PM CDT, James Hilliard wrote:
> Add a patch fixing compilation on hosts with gcc 15.
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Reviewed-by: Brandon Maier <brandon.maier@gmail.com>

Thanks!

> ---
>  ...0002-Don-t-use-C23-constexpr-keyword.patch | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch
>
> diff --git a/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch b/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch
> new file mode 100644
> index 0000000000..5b5c9690da
> --- /dev/null
> +++ b/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch
> @@ -0,0 +1,60 @@
> +From d616741e6b0d5b57b66447e85ad32b283b28adde Mon Sep 17 00:00:00 2001
> +From: Sam James <sam@gentoo.org>
> +Date: Sun, 17 Nov 2024 01:26:27 +0000
> +Subject: [PATCH] Don't use C23 constexpr keyword
> +
> +This fixes building with upcoming GCC 15 which defaults to -std=gnu23.
> +
> +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> +Upstream: https://github.com/fanf2/unifdef/pull/19
> +---
> + unifdef.c | 10 +++++-----
> + 1 file changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/unifdef.c b/unifdef.c
> +index dc145a2..4bd3bda 100644
> +--- a/unifdef.c
> ++++ b/unifdef.c
> +@@ -202,7 +202,7 @@ static int              depth;			/* current #if nesting */
> + static int              delcount;		/* count of deleted lines */
> + static unsigned         blankcount;		/* count of blank lines */
> + static unsigned         blankmax;		/* maximum recent blankcount */
> +-static bool             constexpr;		/* constant #if expression */
> ++static bool             is_constexpr;		/* constant #if expression */
> + static bool             zerosyms;		/* to format symdepth output */
> + static bool             firstsym;		/* ditto */
> +
> +@@ -1086,7 +1086,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp)
> + 			*valp = (value[sym] != NULL);
> + 			lt = *valp ? LT_TRUE : LT_FALSE;
> + 		}
> +-		constexpr = false;
> ++		is_constexpr = false;
> + 	} else if (!endsym(*cp)) {
> + 		debug("eval%d symbol", prec(ops));
> + 		sym = findsym(&cp);
> +@@ -1103,7 +1103,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp)
> + 			lt = *valp ? LT_TRUE : LT_FALSE;
> + 			cp = skipargs(cp);
> + 		}
> +-		constexpr = false;
> ++		is_constexpr = false;
> + 	} else {
> + 		debug("eval%d bad expr", prec(ops));
> + 		return (LT_ERROR);
> +@@ -1170,10 +1170,10 @@ ifeval(const char **cpp)
> + 	long val = 0;
> +
> + 	debug("eval %s", *cpp);
> +-	constexpr = killconsts ? false : true;
> ++	is_constexpr = killconsts ? false : true;
> + 	ret = eval_table(eval_ops, &val, cpp);
> + 	debug("eval = %d", val);
> +-	return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
> ++	return (is_constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
> + }
> +
> + /*
> +--
> +2.34.1
> +
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/unifdef: fix build with gcc 15
  2025-05-14 19:05 [Buildroot] [PATCH 1/1] package/unifdef: fix build with gcc 15 James Hilliard
  2025-05-17 19:07 ` Brandon Maier
@ 2025-05-18 14:41 ` Arnout Vandecappelle via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-05-18 14:41 UTC (permalink / raw)
  To: James Hilliard, buildroot; +Cc: Brandon Maier



On 14/05/2025 21:05, James Hilliard wrote:
> Add a patch fixing compilation on hosts with gcc 15.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

  Applied to 2025.02.x, thanks.

  Regards,
  Arnout

> ---
>   ...0002-Don-t-use-C23-constexpr-keyword.patch | 60 +++++++++++++++++++
>   1 file changed, 60 insertions(+)
>   create mode 100644 package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch
> 
> diff --git a/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch b/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch
> new file mode 100644
> index 0000000000..5b5c9690da
> --- /dev/null
> +++ b/package/unifdef/0002-Don-t-use-C23-constexpr-keyword.patch
> @@ -0,0 +1,60 @@
> +From d616741e6b0d5b57b66447e85ad32b283b28adde Mon Sep 17 00:00:00 2001
> +From: Sam James <sam@gentoo.org>
> +Date: Sun, 17 Nov 2024 01:26:27 +0000
> +Subject: [PATCH] Don't use C23 constexpr keyword
> +
> +This fixes building with upcoming GCC 15 which defaults to -std=gnu23.
> +
> +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> +Upstream: https://github.com/fanf2/unifdef/pull/19
> +---
> + unifdef.c | 10 +++++-----
> + 1 file changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/unifdef.c b/unifdef.c
> +index dc145a2..4bd3bda 100644
> +--- a/unifdef.c
> ++++ b/unifdef.c
> +@@ -202,7 +202,7 @@ static int              depth;			/* current #if nesting */
> + static int              delcount;		/* count of deleted lines */
> + static unsigned         blankcount;		/* count of blank lines */
> + static unsigned         blankmax;		/* maximum recent blankcount */
> +-static bool             constexpr;		/* constant #if expression */
> ++static bool             is_constexpr;		/* constant #if expression */
> + static bool             zerosyms;		/* to format symdepth output */
> + static bool             firstsym;		/* ditto */
> +
> +@@ -1086,7 +1086,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp)
> + 			*valp = (value[sym] != NULL);
> + 			lt = *valp ? LT_TRUE : LT_FALSE;
> + 		}
> +-		constexpr = false;
> ++		is_constexpr = false;
> + 	} else if (!endsym(*cp)) {
> + 		debug("eval%d symbol", prec(ops));
> + 		sym = findsym(&cp);
> +@@ -1103,7 +1103,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp)
> + 			lt = *valp ? LT_TRUE : LT_FALSE;
> + 			cp = skipargs(cp);
> + 		}
> +-		constexpr = false;
> ++		is_constexpr = false;
> + 	} else {
> + 		debug("eval%d bad expr", prec(ops));
> + 		return (LT_ERROR);
> +@@ -1170,10 +1170,10 @@ ifeval(const char **cpp)
> + 	long val = 0;
> +
> + 	debug("eval %s", *cpp);
> +-	constexpr = killconsts ? false : true;
> ++	is_constexpr = killconsts ? false : true;
> + 	ret = eval_table(eval_ops, &val, cpp);
> + 	debug("eval = %d", val);
> +-	return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
> ++	return (is_constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
> + }
> +
> + /*
> +--
> +2.34.1
> +

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-18 14:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 19:05 [Buildroot] [PATCH 1/1] package/unifdef: fix build with gcc 15 James Hilliard
2025-05-17 19:07 ` Brandon Maier
2025-05-18 14:41 ` Arnout Vandecappelle via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox