tech-toolchain archive

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

Re: Building with HAVE_GCC=48 fails on Ubuntu



On Sat, Mar 08, 2014 at 10:15:25PM +0400, Valery Ushakov wrote:
> 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

As an aside, how is that basename() related to the one declared in libgen.h?

NetBSD:
char    *basename(char *);

Ubuntu 12.04.3:
extern char *__xpg_basename (char *__path) __THROW;
#define basename        __xpg_basename

Even fewer const...

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index