I ran into an issue building GDB for MinGW in the libiberty part, due to the non-existent wait function. I fixed this by adding the -Wno-error=implicit-function-declaration flag as seen in #5. This became an error instead of a warning by default in recent versions of GCC. Later I noticed you must have hit the same issue elsewhere judging by patches/binutils/0003-libiberty-waitpid-c-only-compile-waitpid-when-have-waitpid.patch. Apparently there is a bunch of garbage in there that is compiled to object files but never linked anywhere and if it were linked, it would fail. Probably there are more cases of this with other targets.
I ran into an issue building GDB for MinGW in the libiberty part, due to the non-existent
waitfunction. I fixed this by adding the-Wno-error=implicit-function-declarationflag as seen in #5. This became an error instead of a warning by default in recent versions of GCC. Later I noticed you must have hit the same issue elsewhere judging bypatches/binutils/0003-libiberty-waitpid-c-only-compile-waitpid-when-have-waitpid.patch. Apparently there is a bunch of garbage in there that is compiled to object files but never linked anywhere and if it were linked, it would fail. Probably there are more cases of this with other targets.