newlib does not pick up the right cross-compiling gcc
Wed Feb 3 11:29:00 GMT 2010
On 02/03/2010 10:07 AM, R. Diez wrote:
> 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 \
> Look at the "checking for gcc... gcc" below, it should say "powerpc-unknown-eabi-gcc":
This means you don't have powerpc-unknown-eabi-gcc installed rsp. don't
have it in $PATH.
To build newlib separately from gcc (which is what you do) you need your
target's <target>-gcc in $PATH.
More information about the Newlib