Porting newlib-1.8.2 to AVR

Marek Michalkiewicz marekm@linux.org.pl
Sat Jan 1 10:52:00 GMT 2000


Hello,

I'm new to this list, so please excuse me if the questions I ask
have been discussed before.

I'm trying to port newlib-1.8.2 to Atmel AVR microcontrollers
(using avr-gcc and binutils - http://home.overta.ru/users/denisc/ ).
newlib is quite big for an 8-bit micro, but it should be useful
at least on the ATmega103 (128K of flash ROM, 4K of RAM).

I had some success compiling 1.8.1 with avr-gcc, but I'm having
some trouble with the changed configure scripts in 1.8.2.
My changes to build newlib for AVR are available from
http://www.itnet.pl/amelektr/avr/newlib-1.8.2-avr-patch-0.2.gz

I follow the usual steps:

tar xzf newlib-1.8.2.tar.gz
cd newlib-1.8.2
gzip -cd newlib-1.8.2-avr-patch-0.2.gz | patch -p1
./configure --target=avr
make

and I'm getting the following messages:

(during the "configure" step)

Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /home/marekm/newlib-1.8.2
Configuring etc...
creating cache ../config.cache
checking for a BSD compatible install... /usr/bin/install -c
updating cache ../config.cache
creating ./config.status
creating Makefile

(during the "make" step)

make[1]: Entering directory `/home/marekm/newlib-1.8.2/etc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/marekm/newlib-1.8.2/etc'
Configuring in avr/newlib
[... lots of messages, one for each source file]
creating cache ./config.cache
configure: error: can not find install-sh or install.sh in .. ./..
Configuring in avr/libgloss
[... lots of messages, one for each source file]
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking build system type... i686-pc-linux-gnu
checking for gcc... avr-gcc
checking whether we are using GNU C... yes
checking whether avr-gcc accepts -g... yes
checking for ar... avr-ar
checking for ranlib... avr-ranlib
updating cache ./config.cache
creating ./config.status
creating Makefile
Adding multilib support to Makefile in .
multidirs=
with_multisubdir=
configuring in doc
running /bin/sh ./configure  --host=avr --build=i686-pc-linux-gnu --with-newlib
--enable-multilib --with-cross-host=i686-pc-linux-gnu --with-target-subdir=avr -
-cache-file=.././config.cache --srcdir=.
loading cache .././config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
creating ./config.status
creating Makefile
configuring in libnosys
running /bin/sh ./configure  --host=avr --build=i686-pc-linux-gnu --with-newlib
--enable-multilib --with-cross-host=i686-pc-linux-gnu --with-target-subdir=avr -
-cache-file=.././config.cache --srcdir=.
loading cache .././config.cache
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking for function prefix... no
checking for gcc... (cached) avr-gcc
checking whether we are using GNU C... (cached) yes
checking whether avr-gcc accepts -g... (cached) yes
checking for ranlib... (cached) avr-ranlib
creating ./config.status
creating Makefile
creating config.h
Adding multilib support to Makefile in .
with_multisubdir=
[... now libnosys.a is built]

The problem is, libnosys.a is built, but libc.a is not - configure
can't find install-sh because it is looking for it in the wrong
place (should be ../..).  I'm sure someone with more newlib porting
experience can immediately see what is wrong, but I can't figure it
out.  (It looks strange to me that part of configuration is run
during "make" rather than "configure".)  Please help - thanks!

Regards,
Marek


More information about the Newlib mailing list