Hi all:
If I set "--host=powerpc-unknown-eabi" during configuration, newlib picks up some of the cross-compilation tools such as powerpc-unknown-eabi-strip or powerpc-unknown-eabi-as correctly, but not the cross GCC. Instead of powerpc-unknown-eabi-gcc , it picks up the system's native GCC.
I guess this is a bug in newlib's 'configure' script.
As a work-around, you can set enviroment variable CC before calling ./configure , but there's nothing to remind you about that. If you forget, the error message you get later during compilation is not obvious.
Example output:
/home/rdiez/rdiez/Code/blah/blah/newlib-1.18.0/newlib/configure \
--config-cache \
--prefix="/home/rdiez/rdiez/blah/blah/toolchain-mpc8xx-eabi" \
--host=powerpc-unknown-eabi \
--enable-newlib-io-pos-args \
--enable-newlib-io-c99-formats \
--enable-newlib-io-long-long \
--disable-newlib-io-float \
--disable-newlib-iconv \
--disable-newlib-mb \
--disable-shared \
--disable-multilib \
--disable-newlib-supplied-syscalls
Look at the "checking for gcc... gcc" below, it should say "powerpc-unknown-eabi-gcc":