https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122729
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There is no bug here, you need to have a config which defines
HAVE_DECL_BASENAME correctly to either 0 or 1.
Like what is done in gcc/configure.ac:
# gcc_AC_CHECK_DECLS doesn't support overloaded functions, so use the
# normal autoconf function for these. But force definition of
# HAVE_DECL_BASENAME like gcc_AC_CHECK_DECLS does, to suppress the bizarre
# basename handling in libiberty.h.
# Match the configure test in libiberty so that we have a consistent result.
AC_CHECK_DECLS([basename(char*)], , ,[
#undef HAVE_DECL_BASENAME
#define HAVE_DECL_BASENAME 1
#if HAVE_LIBGEN_H
# include <libgen.h>
#endif
#include "ansidecl.h"
#include "system.h"])
Also libiberty.h is almost never installed. If it is it is an issue with your
distro.