Hello Tom, It does build ok with GCC 7.5. Has the minimum required version for building GDB changed? At least for GCC, the minimum requirement seems to be 4.8: https://gcc.gnu.org/install/prerequisites.html Kind regards, Vasee ________________________________ From: Tom Tromey Sent: 14 September 2023 20:33 To: Vaseeharan Vinayagamoorthy Cc: Tom Tromey ; Simon Marchi ; gdb-patches@sourceware.org Subject: Re: [PATCH] Specialize std::hash for ptid_t >>>>> Vaseeharan Vinayagamoorthy writes: > I think that after this patch is when I am seeing these errors when > building cross toolchains, for arm-none-eabi and aarch64-none-elf, > using gcc 4.8. Can you try a newer gcc? > /…/src/binutils-gdb--gdb/gdbsupport/ptid.h:161:13: error: specialization of ‘template struct std::hash’ in different namespace [-fpermissive] Or, alternatively, try the appended? Tom diff --git a/gdbsupport/ptid.h b/gdbsupport/ptid.h index f8644d47633..96c7d9c8bfd 100644 --- a/gdbsupport/ptid.h +++ b/gdbsupport/ptid.h @@ -157,8 +157,10 @@ class ptid_t tid_type m_tid; }; +namespace std +{ template<> -struct std::hash +struct hash { size_t operator() (const ptid_t &ptid) const { @@ -169,6 +171,7 @@ struct std::hash + long_hash (ptid.tid ())); } }; +} /* The null or zero ptid, often used to indicate no process. */