https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127914
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Steve Kargl from comment #1) > The following diff appears to allow bootstrap to continue > with FreeBSD's toolchain, > > diff --git a/include/libiberty.h b/include/libiberty.h > index e905f2cf190..ec5716535d0 100644 > --- a/include/libiberty.h > +++ b/include/libiberty.h > @@ -222,7 +222,7 @@ extern int mkstemps(char *, int); > > /* Make memrchr available on systems that do not have it. */ > #if !defined (__GNU_LIBRARY__ ) && !defined (__linux__) && \ > - !defined (HAVE_MEMRCHR) > + !defined (HAVE_MEMRCHR) && !defined (__FreeBSD__) Surely the right fix is to change the autoconf test that defines HAVE_MEMRCHR so it correctly detects that FreeBSD has it. > extern void *memrchr(const void *, int, size_t); > #endif
