Problems compiling newlib under cygwin
Dave Korn
dave.korn@artimi.com
Wed May 24 19:26:00 GMT 2006
On 24 May 2006 16:41, Fernando Ramos wrote:
> I'm trying to generate a gcc toolset for arm-elf. To that effect I'm
> using binutils 2.16.1, gcc 4.1.0 and a newlib image from cvs from
> 05/22/2006 (I have tried newlib-1.14.0 with the same results, by the
> way).
>
> I have created a bootstrap compiler for gcc 4.1.0 and then went ahead
> and tried the following configuration for newlib:
> ../configure -v --quiet --target=arm-elf
> --prefix=/usr/gcc4.1/arm-elf-4.1.0 --enable-interwork --enable-multilib
> \
> --enable-target-optspace --enable-newlib-multithread
> --disable-newlib-io-float --disable-newlib-supplied-syscalls \
> --with-gnu-as --with-gnu-ld
Did you configure your compiler with the exact same --prefix? Have you run
"make install" on the bootstrap compiler, or are you trying to build newlib
with the freshly built compiler?
> I found this problem when issuing a "make all":
>
> /bin/sh: arm-elf-cc: command not found
> I think this is the relevant portion of
> newlib/arm-elf/newlib/config.log:
> configure:2141: checking for gcc
> configure:2167: result: arm-elf-cc -B/usr/gcc4.1/newlib/arm-elf/newlib/
> -isystem /usr/gcc4.1/newlib/arm-elf/newlib/targ-include -isystem
> /usr/gcc4.1/newlib-1.14.1/newlib/libc/include
This use of a -B argument suggests it's getting mixed up between the freshly
built compiler in your build tree and the installed (or perhaps not yet
installed) version in --prefix.
> uh?? there's nothing called "arm-elf-cc" in my
> /usr/gcc4.1/arm-elf-4.1.0/bin directory. I guess it should be
> arm-elf-gcc ? maybe this is something related to cygwin or to the
> version of autoconf used (autoconf-2.5x) ?
You could look at lines 2141 to 2167 of the configure script, and see why it
chooses that name. My guess is that it's a last-chance-default-fallback
guess.
> what if I hack the thing horribly and make a copy of arm-elf-gcc as
> arm-elf-cc ?
In principle that could work, but you'd need to know /which/ compiler to
use. You could also use a softlink or perhaps set CC= in your environment,
but really this problem is a sign of some underlying error that needs fixing.
My first guess is that you used different --prefix settings for gcc and
newlib.
cheers,
DaveK
--
Can't think of a witty .sigline today....
More information about the Newlib
mailing list