Eric Botcazou <[EMAIL PROTECTED]> writes: > > Building a --target=avr compiler currently fails because > > > > /usr/src/packages/BUILD/gcc-4.1.0-20051110/obj-x86_64-suse-linux/./gcc/xgcc > > -B/usr/src/packages/BUILD/gcc-4.1.0-20051110/obj-x86_64-suse-linux/./gcc/ > > -B/opt/cross/avr/bin/ -B/opt/cross/avr/lib/ -isystem > > /opt/cross/avr/include -isystem /opt/cross/avr/sys-include -O2 -O2 -O2 > > -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -U_FORTIFY_SOURCE > > -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes > > -Wmissing-prototypes -Wold-style-definition -isystem ./include -DDF=SF > > -Dinhibit_libc -mcall-prologues -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED > > -Dinhibit_libc -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include > > -I../../gcc/../libcpp/include -DL_ashrdi3 -c ../../gcc/libgcc2.c -o > > libgcc/./_ashrdi3.o ../../gcc/libgcc2.c: In function '__muldi3': > > ../../gcc/libgcc2.c:511: error: total size of local objects too large > > > > which does not make any sense. The above is for a x86_64 host, but I > > see this errors everywhere. > > I guess the sanity check I've added doesn't apply to micro-controllers. Try > the attached patch.
I didn't realize that we had a target with BITS_PER_UNIT == 8 && UNITS_PER_WORD == 1. I see that for the AVR POINTER_SIZE is 16, which suggests that this code should use POINTER_SIZE or GET_MODE_BITSIZE (Pmode) rather than BITS_PER_WORD. But restricting it to BITS_PER_WORD >= 32 should also be fine. Ian