tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Building with HAVE_GCC=48 fails on Ubuntu



When building external/gpl3/gcc/usr.bin/backend we run configure to
generate auto-build.h for gengenrtl.  The problem is that all
configuration tests fail with:

In file included from 
/home/uwe/work/netbsd/ro/src/external/gpl3/gcc/dist/gcc/system.h:647:0,
                 from conftest.c:117:
/home/uwe/work/netbsd/ro/src/external/gpl3/gcc/dist/gcc/../include/libiberty.h:110:36:
 error: new declaration 'char* basename(const char*)'
/usr/include/string.h:603:28: error: ambiguates old declaration 'const char* 
basename(const char*)'

and generated auto-build.h is bogus, causing more errors later when
gengenrtl is compiled.

Relevant part of string.h:

# ifndef basename
/* Return the file name within directory of FILENAME.  We don't
   declare the function if the `basename' macro is available (defined
   in <libgen.h>) which makes the XPG version of this function
   available.  */
#  ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
extern "C++" char *basename (char *__filename)
     __THROW __asm ("basename") __nonnull ((1));
extern "C++" __const char *basename (__const char *__filename)
     __THROW __asm ("basename") __nonnull ((1));
#  else
extern char *basename (__const char *__filename) __THROW __nonnull ((1));
#  endif
# endif
#endif

-uwe


Home | Main Index | Thread Index | Old Index