Building avr-gcc on debian

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm trying to replace the default deb packages (that doesn't support mega644) with a self build..

I have binutil-42.17 installed properly, with:
./configure --prefix=/opt/avr --target=avr --program-prefix=avr-

And gcc-4.1.2 configured with:
./configure --prefix=/opt/avr --target=avr --program-prefix=avr- --enable-languages=c,c++

But gcc build fails. I applied all the patches, save for the 0* and 1* in gcc. Is it a known problem ?

make[3]: Entering directory `/raid/build/atmel/avr-gcc/build/gcc-4.1.2/avr/libssp'
if /bin/sh ./libtool --mode=compile /raid/build/atmel/avr-gcc/build/gcc-4.1.2/host-i686-pc-linux-gnu/gcc/xgcc -B/raid/build/atmel/avr-gcc/build/gcc-4.1.2/host-i686-pc-linux-gnu/gcc/ -B/opt/avr/avr/bin/ -B/opt/avr/avr/lib/ -isystem /opt/avr/avr/include -isystem /opt/avr/avr/sys-include -DHAVE_CONFIG_H -I. -I../.././libssp -I.    -Wall -O2 -g -O2   -MT ssp.lo -MD -MP -MF ".deps/ssp.Tpo" -c -o ssp.lo ../.././libssp/ssp.c; \
        then mv -f ".deps/ssp.Tpo" ".deps/ssp.Plo"; else rm -f ".deps/ssp.Tpo"; exit 1; fi
/raid/build/atmel/avr-gcc/build/gcc-4.1.2/host-i686-pc-linux-gnu/gcc/xgcc -B/raid/build/atmel/avr-gcc/build/gcc-4.1.2/host-i686-pc-linux-gnu/gcc/ -B/opt/avr/avr/bin/ -B/opt/avr/avr/lib/ -isystem /opt/avr/avr/include -isystem /opt/avr/avr/sys-include -DHAVE_CONFIG_H -I. -I../.././libssp -I. -Wall -O2 -g -O2 -MT ssp.lo -MD -MP -MF .deps/ssp.Tpo -c ../.././libssp/ssp.c -o ssp.o
../.././libssp/ssp.c: In function '__guard_setup':
../.././libssp/ssp.c:70: warning: implicit declaration of function 'open'
../.././libssp/ssp.c:70: error: 'O_RDONLY' undeclared (first use in this function)
../.././libssp/ssp.c:70: error: (Each undeclared identifier is reported only once
../.././libssp/ssp.c:70: error: for each function it appears in.)
../.././libssp/ssp.c:73: error: 'ssize_t' undeclared (first use in this function)
../.././libssp/ssp.c:73: error: expected ';' before 'size'
../.././libssp/ssp.c:75: warning: implicit declaration of function 'close'
../.././libssp/ssp.c:76: error: 'size' undeclared (first use in this function)
../.././libssp/ssp.c: At top level:
../.././libssp/ssp.c:89: error: expected declaration specifiers or '...' before 'size_t'
../.././libssp/ssp.c: In function 'fail':
....

Author of simavr - Follow me on twitter : @buserror

Last Edited: Sun. Aug 5, 2007 - 05:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

libssp cannot work on AVR, because it requires a Posix subsystem
(and effectively, also something like an underlying operating
system). So you have to configure with --disable-libssp.

Have a look at Bingo600's Linux build script in the "sticky"
thread on top of the forum.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm how did I miss that one ?

/me slaps himself :D

Author of simavr - Follow me on twitter : @buserror