I have the latest gcc from svn, and with "configure --target=avr 
--enable-languages=c":

When building with "make" eventually I get:

gcc   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes 
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common  
-DHAVE_CONFIG_H  -o lto1 \
                lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o main.o 
tree-browser.o libbackend.a libcommon-target.a libcommon.a ../libcpp/libcpp.a 
../libdecnumber/libdecnumber.a   -lmpc -lmpfr -lgmp -rdynamic -ldl  -L../zlib 
-lz libcommon.a ../libcpp/libcpp.a   ../libiberty/libiberty.a 
../libdecnumber/libdecnumber.a 
libbackend.a(avr.o): In function `avr_pgm_check_var_decl':
/home/sean/build/gcc-svn/build-avr-nofixed/gcc/../../gcc/config/avr/avr.c:6652: 
undefined reference to `c_addr_space_name'
/home/sean/build/gcc-svn/build-avr-nofixed/gcc/../../gcc/config/avr/avr.c:6649: 
undefined reference to `c_addr_space_name'
libbackend.a(avr.o): In function `avr_insert_attributes':
/home/sean/build/gcc-svn/build-avr-nofixed/gcc/../../gcc/config/avr/avr.c:6690: 
undefined reference to `c_addr_space_name'
libbackend.a(avr.o): In function `avr_out_lpm':
/home/sean/build/gcc-svn/build-avr-nofixed/gcc/../../gcc/config/avr/avr.c:2352: 
undefined reference to `c_addr_space_name'
collect2: ld returned 1 exit status

avr.c uses c_addr_space_name to get the names of address spaces for 
diagnostics.  GCC's build machinery does not arrange for this symbol
to be available when linking lto1.  If configured with --disable-lto,
the compiler builds, but lto is unavailable.

This issue is causing trouble for people building the avr toolchain,
and will likely affect other targets as they adopt the use of
c_addr_space_name.  Please suggest a fix.

Sean

Reply via email to