newlib does not pick up the right cross-compiling gcc
R. Diez
rdiezmail-newlib@yahoo.de
Wed Feb 3 09:07:00 GMT 2010
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":
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
configure: creating cache config.cache
checking build system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane.... yes
checking for powerpc-unknown-eabi-strip... powerpc-unknown-eabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking host system type... powerpc-unknown-eabi
checking for gcc... gcc
checking dependency style of gcc... gcc3
checking whether we are using GNU C... yes
checking whether gcc accepts -g... no
checking for powerpc-unknown-eabi-as... powerpc-unknown-eabi-as
checking for powerpc-unknown-eabi-ar... powerpc-unknown-eabi-ar
checking for powerpc-unknown-eabi-ranlib... powerpc-unknown-eabi-ranlib
checking for powerpc-unknown-eabi-readelf... powerpc-unknown-eabi-readelf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a sed that does not truncate output... /bin/sed
checking for gawk... (cached) gawk
checking for .preinit_array/.init_array/.fini_array support.... yes
checking whether long double type exists... yes
checking whether long double equals double... no
configure: updating cache config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating newlib.h
config.status: executing depfiles commands
Thanks,
R. Diez
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
More information about the Newlib
mailing list