$ /src/gcc/configure --target=avr --enable-languages=c --disable-nls --with-as=/usr/local/bin/avr-as --with-ld=/usr/local/bin/avr-ld [..] $ make [..] /src/obj/gcc/xgcc -B/src/obj/gcc/ -B/usr/local/avr/bin/ -B/usr/local/avr/lib/ -isystem /usr/local/avr/include -isystem /usr/local/avr/sys-include -O2 -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/src/gcc/gcc -I/src/gcc/gcc/ -I/src/gcc/gcc/../include -I/src/gcc/gcc/../libcpp/include -DL__main -c /src/gcc/gcc/libgcc2.c -o libgcc/./__main.o /src/gcc/gcc/libgcc2.c: In function '__do_global_dtors': /src/gcc/gcc/libgcc2.c:1576: error: initializer for integer value is too complicated make[2]: *** [libgcc/./__main.o] Error 1 make[2]: Leaving directory `/src/obj/gcc' make[1]: *** [stmp-multilib] Error 2 make[1]: Leaving directory `/src/obj/gcc' make: *** [all-gcc] Error 2
Could attach the preprocessed source?
Can you also state the version number of libgcc2.c? I'd like to look at the actual line, the error message strikes me as rather badly worded... W.
Created attachment 7247 [details] libgcc2.i
> Can you also state the version number of libgcc2.c? Its the version from gcc-HEAD (gcc version 4.0.0 20040928) The error-text seems to come from varasm.c :-/
I can't reproduce this error message on x86 linux with your .i file and a CVS snapshot of an hour ago :-( W.
Confirmed: The problem comes from: 2011 /* Avoid GAS bugs for values > word size. */ 2012 if (size > UNITS_PER_WORD) 2013 return false; Caused by: 2004-09-21 Paul Brook <paul@codesourcery.com> * varasm.c (default_assemble_integer): Return false for values wider than the target word size. Works around GAS bug. Reduced testcase: typedef void (*func_ptr) (void); extern func_ptr __DTOR_LIST__[]; func_ptr *p = __DTOR_LIST__ + 1;
Still present on mainline. Prevents bootstrap on avr.
Patch Here. http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01437.html
Works for me, thanks! Patch still waiting for review in gcc-patches.
Subject: Bug 17735 CVSROOT: /cvs/gcc Module name: gcc Changes by: pbrook@gcc.gnu.org 2004-11-19 13:12:45 Modified files: gcc : ChangeLog varasm.c Log message: PR target/17735 * varasm.c (default_assemble_integer): Allow pointer-sized values. Expand comment. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6413&r2=2.6414 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&r1=1.460&r2=1.461
Fixed.