binutils package seems to be changed, as it includes directory of libiberty.h has moved to /usr/include/libiberty, thus there is possible a wrong include in bfd.h regarding ansidecl.h.
Getting those compile errors when using binutils trace utilities
/usr/include/libiberty/libiberty.h: In function ‘basename’:
/usr/include/libiberty/libiberty.h:110:38: error: expected declaration specifiers before ‘ATTRIBUTE_RETURNS_NONNULL’
extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
/usr/include/libiberty/libiberty.h:121:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ATTRIBUTE_RETURNS_NONNULL’
extern const char *lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
/usr/include/libiberty/libiberty.h:126:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ATTRIBUTE_RETURNS_NONNULL’
extern const char *dos_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
/usr/include/libiberty/libiberty.h:132:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ATTRIBUTE_RETURNS_NONNULL’
extern const char *unix_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
By changing bfd.h to include /usr/include/libiberty/ansidecl.h, everything went fine in my compilation.
Please, any hints for this issue? Thanks.