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

Kai Ruottu
Thu Nov 9 11:18:00 GMT 2017

Jonny H kirjoitti 9.11.2017 klo 12:36:

 > On Thursday, 9 November 2017, 8:14, Kai Ruottu 
<> wrote:
 >> The three step builds with a "bootstrap GCC", "newlib" and "full GCC"
 >> should be some remnant from the old ages. Building both GCC and 
newlib (plus gmp, mpc, mpfr
 >> etc) in only one step should work.
 > Thanks, I should add a couple of things, I couldn't build the newlib 
2.5 sources, I hit the same error
 > as described here:

My old slow 32-bit Linux PC is still producing libstdc++-v3... Forgot to 
disable multilib which made it
still slower :(  But producing newlib-2.5 with gcc-7.2.0 for ppc-eabi 
succeeded without problems
(it didn't stop anywhere).  Ok, now it did stop here :

Checking multilib configuration for libbacktrace...
Configuring in ppc-eabi/libbacktrace
configure: loading cache ./config.cache
checking build system type... i686-pc-linux-gnu
checking host system type... powerpc-unknown-eabi
checking target system type... powerpc-unknown-eabi
checking for ppc-eabi-gcc... /home/src-old/gcc-7.2.0/build/./gcc/xgcc 
-B/home/src-old/gcc-7.2.0/build/./gcc/ -nostdinc 
-B/home/src-old/gcc-7.2.0/build/ppc-eabi/newlib/ -isystem 
/home/src-old/gcc-7.2.0/build/ppc-eabi/newlib/targ-include -isystem 
-L/home/src-old/gcc-7.2.0/libgloss/rs6000 -B/opt/cross/ppc-eabi/bin/ 
-B/opt/cross/ppc-eabi/lib/ -isystem /opt/cross/ppc-eabi/include -isystem 
checking for C compiler default output file name...
configure: error: in `/home/src-old/gcc-7.2.0/build/ppc-eabi/libbacktrace':
configure: error: C compiler cannot create executables

Of course the "target system" for ppc-eabi is something unknown so no 
default startups, libgloss, linker script
etc... So no executables for it as default. Why the '--with-newlib' 
didn't cause disabling all linking tests is weird.
Seemingly I must add those '--disable-multilib' and 
'--disable-libbacktrace' in the GCC configure and start again.

Producing 'libssp' succeeded but you had disabled it and seemingly 
had'nt problems with 'libbacktrace'. Weird...

> The other thing is that my test with gcc 6.2 was actually done using crosstool-ng
> Which automates the cross-build. I don't know if this uses the three step build method, it may not.

Maybe this modifies the build defaults, disabling those libs which 
wouldn't succeed...

More information about the Gcc-help mailing list