gcc-toolset-15-binutils/bin.ppc64.gcc.patch
2025-06-25 10:21:33 +01:00

25 lines
1.1 KiB
Diff

diff -rup binutils.orig/ld/ldlang.c binutils-with-gold-2.44/ld/ldlang.c
--- binutils.orig/ld/ldlang.c 2025-06-25 09:37:36.524268728 +0100
+++ binutils-with-gold-2.44/ld/ldlang.c 2025-06-25 09:37:54.787387725 +0100
@@ -8042,6 +8042,19 @@ lang_list_remove_tail (lang_statement_li
{
union lang_statement_union **savetail;
/* Check that ORIGLIST really is an earlier state of DESTLIST. */
+
+ if (getenv ("LD_DEBUG_NEVER") != NULL)
+ {
+ /* FIXME: RHEL-49348: For some reason building this function for the
+ PowerPC architecture on RHEL-10 is resulting in a linker that
+ triggers the ASSERT below - because the origlist pointer is
+ corrupt. These fprintf statements, even if they will never be
+ used, are enough to cause the compiler to build the function
+ correctly, thus avoiding the problem. */
+ fprintf (stderr, "origlist %p destlist %p\n", origlist, destlist);
+ fprintf (stderr, "heads: %p %p\n", origlist->head, destlist->head);
+ }
+
ASSERT (origlist->head == destlist->head);
savetail = origlist->tail;
origlist->head = *(savetail);
Only in binutils-with-gold-2.44/ld: ldlang.c.orig