diff mbox series

[whinlatter,v2,1/2] binutils: Fix build with GLIBC 2.43 on the host

Message ID 20260407133521.840916-1-zboszor@gmail.com
State New
Headers show
Series [whinlatter,v2,1/2] binutils: Fix build with GLIBC 2.43 on the host | expand

Commit Message

Zoltán Böszörményi April 7, 2026, 1:35 p.m. UTC
Added a patch to fix a build error in the CALL_UTIL() macro
when built against GLIBC 2.43 on Fedora 44. This fixes
binutils-native.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 .../binutils/binutils-2.45.inc                |  1 +
 ...tect-against-standard-library-macros.patch | 34 +++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch

Comments

Martin Jansa April 7, 2026, 1:45 p.m. UTC | #1
I've sent this one for scarthgap in:
https://patchwork.yoctoproject.org/project/oe-core/patch/20260326181450.1262870-6-martin.jansa@gmail.com/
but surprisingly gcc-cross nor binutils were failing for me in
whinlatter with ubuntu-26.04, please help asking Yoann to accept them
(https://lists.openembedded.org/g/bitbake-devel/message/19317),
because last message from him is that he is putting the glibc-2.43
series on hold until there is a new host with glibc-2.43 in
autobuilder and that will probably be after whinlatter is EOL :/.

Cheers,

On Tue, Apr 7, 2026 at 3:35 PM Zoltán Böszörményi <zboszor@gmail.com> wrote:
>
> Added a patch to fix a build error in the CALL_UTIL() macro
> when built against GLIBC 2.43 on Fedora 44. This fixes
> binutils-native.
>
> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> ---
>  .../binutils/binutils-2.45.inc                |  1 +
>  ...tect-against-standard-library-macros.patch | 34 +++++++++++++++++++
>  2 files changed, 35 insertions(+)
>  create mode 100644 meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
>
> diff --git a/meta/recipes-devtools/binutils/binutils-2.45.inc b/meta/recipes-devtools/binutils/binutils-2.45.inc
> index 16a63cabc5..666b588062 100644
> --- a/meta/recipes-devtools/binutils/binutils-2.45.inc
> +++ b/meta/recipes-devtools/binutils/binutils-2.45.inc
> @@ -46,4 +46,5 @@ SRC_URI = "\
>       file://0018-CVE-2025-11494.patch \
>       file://0019-CVE-2025-11839.patch \
>       file://0020-CVE-2025-11840.patch \
> +     file://0001-gprofng-protect-against-standard-library-macros.patch \
>  "
> diff --git a/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch b/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
> new file mode 100644
> index 0000000000..b626c51b6c
> --- /dev/null
> +++ b/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
> @@ -0,0 +1,34 @@
> +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.
> +
> +Signed-off-by: Andreas Schwab <schwab@suse.de>
> +Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5f66aee7f4bec7a2d8378034116f5e5c3dc50f41]
> +---
> + 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.53.0
> +
> --
> 2.53.0
>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.45.inc b/meta/recipes-devtools/binutils/binutils-2.45.inc
index 16a63cabc5..666b588062 100644
--- a/meta/recipes-devtools/binutils/binutils-2.45.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.45.inc
@@ -46,4 +46,5 @@  SRC_URI = "\
      file://0018-CVE-2025-11494.patch \
      file://0019-CVE-2025-11839.patch \
      file://0020-CVE-2025-11840.patch \
+     file://0001-gprofng-protect-against-standard-library-macros.patch \
 "
diff --git a/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch b/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
new file mode 100644
index 0000000000..b626c51b6c
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
@@ -0,0 +1,34 @@ 
+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.
+
+Signed-off-by: Andreas Schwab <schwab@suse.de>
+Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5f66aee7f4bec7a2d8378034116f5e5c3dc50f41]
+---
+ 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.53.0
+