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

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

 



Kai Ruottu kirjoitti 9.11.2017 klo 14:11:
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 :

#ifndef HAVE_STRNDUP
<code>
#endif

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

Oops... Must check my eyes or learn to look a little backwards... Just before
the previous there was :

case "${host}--x${with_newlib}" in
  mips*--xyes)
    hardwire_newlib=1;;
  nvptx*--xyes)
    hardwire_newlib=1;;
esac

Nowhere else besides in the 'libgfortran' subdir this was seen. Duplicates
in 'configure.ac' and 'configure'. Maybe fixing the '.ac' could be enough or
then both. I'm not any expert in the GNU configury system...  It seems that
the choices for Fortran are quite limited and 'powerpc' should be added too.

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...






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux