avr32-gcc compiler - Linux host - binutils problem

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

Hi, this post is kind of a gray area for both Linux and AVR32 general forum. I'm trying to build the avr32-gcc stand-alone toolchain to use with the buildroot avr32-linux-gcc toolchain.

I've run ../binutils-2.17/configure --target=avr32 but when I run 'make' I get an error in 'do_scrub_chars' complaining about the array subscript being below array bounds.

Has anyone successfully compiled the standalone toolchain? I would like to avoid installing the pre-built RPM toolchain.

Thanks, Matt.

make[4]: Entering directory `/usr/avr32/buildroot-avr32-v2.2.0-rc4/toolchain_build_avr32/build-binutils-avr32/gas'
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.17/gas -I. -D_GNU_SOURCE -I. -I../../binutils-2.17/gas -I../bfd -I../../binutils-2.17/gas/config -I../../binutils-2.17/gas/../include -I../../binutils-2.17/gas/.. -I../../binutils-2.17/gas/../bfd -I../../binutils-2.17/gas/../intl -I../intl -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-2.17/gas/app.c
cc1: warnings being treated as errors
../../binutils-2.17/gas/app.c: In function 'do_scrub_chars':
../../binutils-2.17/gas/app.c:566: error: array subscript is below array bounds
make[4]: *** [app.o] Error 1
make[4]: Leaving directory `/usr/avr32/buildroot-avr32-v2.2.0-rc4/toolchain_build_avr32/build-binutils-avr32/gas'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/avr32/buildroot-avr32-v2.2.0-rc4/toolchain_build_avr32/build-binutils-avr32/gas'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/avr32/buildroot-avr32-v2.2.0-rc4/toolchain_build_avr32/build-binutils-avr32/gas'
make[1]: *** [all-gas] Error 2
make[1]: Leaving directory `/usr/avr32/buildroot-avr32-v2.2.0-rc4/toolchain_build_avr32/build-binutils-avr32'
make: *** [all] Error 2
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which platform and which version of gcc are you using to compile?

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

If you are using GCC 4.3 you will have this:

"-Warray-bounds has been added and is now enabled by default for -Wall . It produces warnings for array subscripts that can be determined at compile time to be always out of bounds. -Wno-array-bounds will disable the warning. "

You can add '--disable-werror' when running 'configure' for binutils to avoid this error. Thta works for me.

There might be a way to just add '-Wno-array-bounds' to the compilation process, but I am not yet sure how.

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

pab, thanks hopefully that will work...I will give it a try as soon as I can - I'll let you know what happens.

Thanks again, Matt.