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