Re: --target=powerpc-eabi: error: static declaration of ‘strndup’ follows non-static declaration

Kai Ruottu
Thu Nov 9 12:12:00 GMT 2017

Kai Ruottu kirjoitti 9.11.2017 klo 13:45:
> My old slow 32-bit Linux PC is still producing libstdc++-v3... Forgot 
> to disable multilib which made it still slower:(

While waiting my build arriving into the ligfortran phase, I checked 
what would cause
the double definition. There was that :


wrapper around the redefined function. So investigating why this #define 
wasn't set
would be done.  In the 'libgfortran/runtime/configure' is the following :

----------- clip ---------------
# Check for library functions.

if test "${hardwire_newlib:-0}" -eq 1; then
    # We are being configured with a cross compiler. AC_REPLACE_FUNCS
    # may not work correctly, because the compiler may not be able to
    # link executables.

$as_echo "#define HAVE_MKSTEMP 1" >>confdefs.h

$as_echo "#define HAVE_STRTOF 1" >>confdefs.h

$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h

$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h

$as_echo "#define HAVE_LOCALTIME_R 1" >>confdefs.h

$as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h

$as_echo "#define HAVE_STRNLEN 1" >>confdefs.h

$as_echo "#define HAVE_STRNDUP 1" >>confdefs.h

----------- clip ---------------

Where that 'hardwire_newlib' will be set I don't know but first

checking whether the generated 
'powerpc-eabi/libgfortran/runtime/confdefs.h' or

somewhere else has these '#define's could be done. The problem is there...

More information about the Gcc-help mailing list