summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-11-18 04:28:29 -0500
committerIonen Wolkens <ionen@gentoo.org>2024-11-18 04:59:13 -0500
commit869d0dd6ceb9728b6792fe2ad6b46e62e6367a4f (patch)
tree89cd62249afcd9d98085b3f60379749b96a07d7b /dev-util/mingw64-toolchain/files
parentsys-kernel/genkernel: Stabilize 4.3.16 ppc, #943742 (diff)
downloadgentoo-869d0dd6ceb9728b6792fe2ad6b46e62e6367a4f.tar.gz
gentoo-869d0dd6ceb9728b6792fe2ad6b46e62e6367a4f.tar.bz2
gentoo-869d0dd6ceb9728b6792fe2ad6b46e62e6367a4f.zip
dev-util/mingw64-toolchain: fix binutils build with c23 (gcc15)
Closes: https://bugs.gentoo.org/943715 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-util/mingw64-toolchain/files')
-rw-r--r--dev-util/mingw64-toolchain/files/binutils-2.42-c23.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/dev-util/mingw64-toolchain/files/binutils-2.42-c23.patch b/dev-util/mingw64-toolchain/files/binutils-2.42-c23.patch
new file mode 100644
index 000000000000..f7e18615d6e0
--- /dev/null
+++ b/dev-util/mingw64-toolchain/files/binutils-2.42-c23.patch
@@ -0,0 +1,93 @@
+Needed with gcc15 due to newly defaulting to c23 (fixed in >=binutils-2.44).
+
+https://bugs.gentoo.org/943715
+https://sourceware.org/PR32372
+https://inbox.sourceware.org/binutils/cover.1731741209.git.sam@gentoo.org/
+(technically the full set of patches is not needed here, but doesn't hurt)
+--- a/binutils/bfd/elf32-ppc.c
++++ b/binutils/bfd/elf32-ppc.c
+@@ -4354,3 +4354,3 @@
+ if (!bfd_elf_link_record_dynamic_symbol (info, opt))
+- return false;
++ return NULL;
+ }
+--- a/binutils/bfd/elf32-xtensa.c
++++ b/binutils/bfd/elf32-xtensa.c
+@@ -10073,3 +10073,3 @@
+
+- removed = false;
++ removed = NULL;
+ if (is_operand_relocation (fix->src_type))
+@@ -10144,3 +10144,3 @@
+
+- removed = false;
++ removed = NULL;
+ if (is_operand_relocation (ELF32_R_TYPE (orig_rel->rela.r_info)))
+--- a/binutils/bfd/elf64-ppc.c
++++ b/binutils/bfd/elf64-ppc.c
+@@ -4666,3 +4666,3 @@
+ if (ent == NULL)
+- return false;
++ return NULL;
+ ent->next = local_got_ents[r_symndx];
+--- a/binutils/bfd/mach-o.c
++++ b/binutils/bfd/mach-o.c
+@@ -6039,3 +6039,3 @@
+ if (ncmd != 1 || uuid_cmd == NULL)
+- return false;
++ return NULL;
+ return &uuid_cmd->command.uuid;
+--- a/binutils/bfd/xsym.c
++++ b/binutils/bfd/xsym.c
+@@ -133,3 +133,3 @@
+ if (bfd_seek (abfd, table_offset, SEEK_SET) != 0)
+- return false;
++ return NULL;
+ return _bfd_alloc_and_read (abfd, table_size, table_size);
+--- a/binutils/binutils/prdbg.c
++++ b/binutils/binutils/prdbg.c
+@@ -2820,3 +2820,3 @@
+ abort ();
+- return false;
++ return NULL;
+ }
+--- a/binutils/ld/pdb.c
++++ b/binutils/ld/pdb.c
+@@ -177,3 +177,3 @@
+ bfd_close (stream);
+- return false;
++ return NULL;
+ }
+--- a/binutils/opcodes/i386-gen.c
++++ b/binutils/opcodes/i386-gen.c
+@@ -32,3 +32,5 @@
+ in preference where possible. */
++#ifndef static_assert
+ #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
++#endif
+
+--- a/binutils/opcodes/mips-formats.h
++++ b/binutils/opcodes/mips-formats.h
+@@ -51,3 +51,3 @@
+ typedef char ATTRIBUTE_UNUSED \
+- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
++ static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static const struct mips_mapped_int_operand op = { \
+@@ -85,3 +85,3 @@
+ typedef char ATTRIBUTE_UNUSED \
+- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
++ static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static const struct mips_reg_operand op = { \
+@@ -95,3 +95,3 @@
+ typedef char ATTRIBUTE_UNUSED \
+- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
++ static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static const struct mips_reg_operand op = { \
+--- a/binutils/opcodes/s390-opc.c
++++ b/binutils/opcodes/s390-opc.c
+@@ -38,3 +38,5 @@
+ in preference where possible. */
++#ifndef static_assert
+ #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
++#endif
+