compiling bootstrap gcc for gcc-4.2.1-atmel.1.0.3

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

Hi everybody,
I'm having problems compiling the latest gcc from atmel (avr32-gcc-4.2.1-atmel.1.0.3.tar.gz), just after make and make install with binutils.

at the end of doing

./configure --target=avr32-linux --enable-languages=c --disable-threads --disable-libmudflap --disable-libssp --prefix=/usr/local

I get:

checking for sys/stat.h... (cached) no
checking for stdlib.h... (cached) no
checking for string.h... (cached) no
checking for memory.h... no
checking for strings.h... (cached) no
checking for inttypes.h... no
checking for stdint.h... (cached) no
checking for unistd.h... (cached) no
checking for int... no
checking size of int... 0
checking for uintptr_t... no
checking for a 64-bit type... unsigned long long
checking for pid_t... no
checking for library containing strerror... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libiberty] Error 1
make[1]: Leaving directory `/root/compile/avr32/gcc-4.2.1'

I get this error with both debian unstable and Linux Mint distros. Any idea how to solve it? I read there might be a problem with autoconf.

EDIT:
seems to be a problem with bootstraping.. the configura script can't find libc or equivalents, yet.. I read something about --enable-bootstrap on forums. I will try it and keep the post updated. thanks

thanks

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

Well now I got this error:

gcc   -g -fkeep-inline-functions -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common   -DHAVE_CONFIG_H  -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-objc-common.o c-dump.o c-pch.o c-parser.o  c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \
          main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
libbackend.a(avr32.o):(.data+0x0): multiple definition of `avr32_arch_name'
libbackend.a(options.o):(.bss+0x358): first defined here
libbackend.a(avr32.o):(.data+0x4): multiple definition of `avr32_part_name'
libbackend.a(options.o):(.bss+0x35c): first defined here
collect2: ld returned 1 exit status
make[3]: *** [cc1-dummy] Error 1
make[3]: Leaving directory `/root/compile/avr32/gccbuild/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/root/compile/avr32/gccbuild'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/compile/avr32/gccbuild'
make: *** [all] Error 2

maybe I am missing a configure parameter?

thanks
Carlos

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

I recommend using Buildroot [1] for building the toolchain, that way you do not have to sort out all the PATH issues, etc.

1: http://www.atmel.no/buildroot

Hans-Christian

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

nice , thanks:P

I will see if I can get the parameters from buildroot... I wish there was an option to only build the toolchain.

thanks!

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

I built the bootstrap gcc by using two more options at config:

--disable-libiberty and --disable-libgomp

Please, let me know if that works for you.

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

I haven't tried it yet, since I used the toolchain compiled by buildroot. I will let you know if it works in case I have to do it manually.

thanks