Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Kuhls <bernd@kuhls.net>
To: buildroot@buildroot.org
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
	Romain Naour <romain.naour@gmail.com>
Subject: [Buildroot] [PATCH 1/1] package/binutils: add build fixes for host gcc 16.x
Date: Wed,  8 Jul 2026 22:34:25 +0200	[thread overview]
Message-ID: <20260708203425.2073196-1-bernd@kuhls.net> (raw)

Backport upstream patch already included in binutils 2.46 to older
supported versions to fix build errors in gprofng with host gcc 16.x.

Fixes:
2.45.1: https://autobuild.buildroot.net/results/235/235c8a176dada9f9cb5541fcdd188e8f01f4cd22/
2.44: https://autobuild.buildroot.net/results/a53/a53c06dd61083451f9092ed1544619ca4a62211d/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Gitlab pipeline passed:
https://gitlab.com/bkuhls/buildroot/-/commits/7581a30975b8b5f5abfcb966ac920c3506c2e545

 ...tect-against-standard-library-macros.patch | 35 +++++++++++++++++++
 ...tect-against-standard-library-macros.patch | 35 +++++++++++++++++++
 2 files changed, 70 insertions(+)
 create mode 100644 package/binutils/2.44/0005-gprofng-protect-against-standard-library-macros.patch
 create mode 100644 package/binutils/2.45.1/0004-gprofng-protect-against-standard-library-macros.patch

diff --git a/package/binutils/2.44/0005-gprofng-protect-against-standard-library-macros.patch b/package/binutils/2.44/0005-gprofng-protect-against-standard-library-macros.patch
new file mode 100644
index 0000000000..b344d7e2f6
--- /dev/null
+++ b/package/binutils/2.44/0005-gprofng-protect-against-standard-library-macros.patch
@@ -0,0 +1,35 @@
+From 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@suse.de>
+Date: Sat, 22 Nov 2025 11:29:43 +0100
+Subject: [PATCH] gprofng: protect against standard library macros
+
+The CALL_UTIL macro can expand to an unparsable expression of the argument
+is a macro, like with the new const-preserving standard library macros in
+C23.
+
+	* gprofng/src/collector_module.h (CALL_UTIL): Add parens to not
+	expand its argument if it is a function-like macro.
+
+Upstream: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5f66aee7f4bec7a2d8378034116f5e5c3dc50f41
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ gprofng/src/collector_module.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
+index b64d69c45ab..859a6dd1f7d 100644
+--- a/gprofng/src/collector_module.h
++++ b/gprofng/src/collector_module.h
+@@ -119,7 +119,7 @@ typedef struct CollectorUtilFuncs
+ extern CollectorUtilFuncs __collector_util_funcs;
+ extern int __collector_dlsym_guard;
+ 
+-#define CALL_UTIL(x) __collector_util_funcs.x
++#define CALL_UTIL(x) (__collector_util_funcs.x)
+ 
+ /* The following constants define the meaning of the "void *arg"
+  * argument of getFrameInfo().
+-- 
+2.43.7
+
diff --git a/package/binutils/2.45.1/0004-gprofng-protect-against-standard-library-macros.patch b/package/binutils/2.45.1/0004-gprofng-protect-against-standard-library-macros.patch
new file mode 100644
index 0000000000..b344d7e2f6
--- /dev/null
+++ b/package/binutils/2.45.1/0004-gprofng-protect-against-standard-library-macros.patch
@@ -0,0 +1,35 @@
+From 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@suse.de>
+Date: Sat, 22 Nov 2025 11:29:43 +0100
+Subject: [PATCH] gprofng: protect against standard library macros
+
+The CALL_UTIL macro can expand to an unparsable expression of the argument
+is a macro, like with the new const-preserving standard library macros in
+C23.
+
+	* gprofng/src/collector_module.h (CALL_UTIL): Add parens to not
+	expand its argument if it is a function-like macro.
+
+Upstream: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5f66aee7f4bec7a2d8378034116f5e5c3dc50f41
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ gprofng/src/collector_module.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
+index b64d69c45ab..859a6dd1f7d 100644
+--- a/gprofng/src/collector_module.h
++++ b/gprofng/src/collector_module.h
+@@ -119,7 +119,7 @@ typedef struct CollectorUtilFuncs
+ extern CollectorUtilFuncs __collector_util_funcs;
+ extern int __collector_dlsym_guard;
+ 
+-#define CALL_UTIL(x) __collector_util_funcs.x
++#define CALL_UTIL(x) (__collector_util_funcs.x)
+ 
+ /* The following constants define the meaning of the "void *arg"
+  * argument of getFrameInfo().
+-- 
+2.43.7
+
-- 
2.47.3

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

             reply	other threads:[~2026-07-08 20:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 20:34 Bernd Kuhls [this message]
2026-08-16 15:06 ` [Buildroot] [PATCH 1/1] package/binutils: add build fixes for host gcc 16.x Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260708203425.2073196-1-bernd@kuhls.net \
    --to=bernd@kuhls.net \
    --cc=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=romain.naour@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox