Closed ilg-ul closed 13 years ago
Hmm.. I'm guessing the patches applied correctly, but maybe another stage failed later.
From the patches: avr32-toolchain> grep -ri BFD_RELOC_AVR32_DIFF32 source/avr32/binutils
source/avr32/binutils/30-binutils-2.20.1-avr32-bfd.patch:+ { BFD_RELOC_AVR32_DIFF32, R_AVR32_DIFF32 },
source/avr32/binutils/30-binutils-2.20.1-avr32-bfd.patch:+ BFD_RELOC_AVR32_DIFF32
source/avr32/binutils/32-binutils-2.20.1-avr32-gas.patch:+ fixP->fx_r_type = BFD_RELOC_AVR32_DIFF32; source/avr32/binutils/32-binutils-2.20.1-avr32-gas.patch:+ case BFD_RELOC_AVR32_DIFF32: source/avr32/binutils/32-binutils-2.20.1-avr32-gas.patch:+ fixP->fx_r_type = BFD_RELOC_AVR32_DIFF32;
From binutils sources after a successful build: binutils-2.20.1/bfd/bfd-in2.h: BFD_RELOC_AVR32_DIFF32, binutils-2.20.1/bfd/elf32-avr32.c: { BFD_RELOC_AVR32_DIFF32, R_AVR32_DIFF32 }, binutils-2.20.1/bfd/libbfd.h: "BFD_RELOC_AVR32_DIFF32", binutils-2.20.1/bfd/reloc.c: BFD_RELOC_AVR32_DIFF32 binutils-2.20.1/gas/config/tc-avr32.c: fixP->fx_r_type = BFD_RELOC_AVR32_DIFF32; binutils-2.20.1/gas/config/tc-avr32.c: case BFD_RELOC_AVR32_DIFF32: binutils-2.20.1/gas/config/tc-avr32.c: fixP->fx_r_type = BFD_RELOC_AVR32_DIFF32; binutils-2.20.1/gas/config/tc-avr32.c.orig: fixP->fx_r_type = BFD_RELOC_AVR32_DIFF32; binutils-2.20.1/gas/config/tc-avr32.c.orig: case BFD_RELOC_AVR32_DIFF32: binutils-2.20.1/gas/config/tc-avr32.c.orig: fixP->fx_r_type = BFD_RELOC_AVR32_DIFF32;
It looks like the headers that are extra from the grep above are generated by running make headers in the bfd directory (i.e.: make -C bfd headers). I realize that this gets run from build/binutils rather than in binutils-2.20.1, so I'm a little surprised that it hops back and changes headers in the original sources. The regen-binutils stage does not change the headers, so it must be done at the build-binutils stage.
I would check what happens if you try and do make -C bfd headers from within binutils-2.20.1. Maybe I'll force this to be from the main sources directory if that's the problem.
Also, I suspect the modifications you made should be fine, but make sure you use autotools from the ones I build. Other versions may or may not work. I found this to range from flaky to broken, which is why I'm using autoconf 2.64 and automake 1.11.
Also, this version has more granular build staging and targets are kept track of using "stamp" files in the stamps directory, so if you want to force it to retry something, keep that in mind. After I've worked out some more kinks with this approach, I plan to use it on the ARM tools as well since it should be easier to fix things in place and not have the build system nuke them when you'd prefer to pick up where things left off.
I've also just pushed a change that should correct the failed md5sums that were complained about on arm version. Not sure if that might influence anything or not.
I managed to complete the build, using the current (af9fff3) revision.
As deviations from your build, I used a different PREFIX and the Homebrew dependencies are not in /usr/local.
The different PREFIX required an updated PATH (as per separate ticket); different location for dependencies required adding extra definitions like --with-mpc when building gcc/g++.
Liviu
I think I know what I missed with my first attempt, I tried to run the make with sudo, as for a previous version of the ARM builds :-(
OK, so shall I close this one for now?
that's correct, I have a fully functional avr32 toolchain, already in use for a real project.
on my machine the build fails quite early, in binutils.
I confess that I have the dependencies installed in /brew/local instead of /usr/local, and I patched the Makefile to include this path while building gcc and g++, but I thought binutils does not use these dependencies.
the missing definitions (like BFD_RELOC_AVR32_DIFF32) seem to be related to some missing patches over binutils.
any idea?
Liviu
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../binutils-2.20.1/bfd -I. -I../../../binutils-2.20.1/bfd -I../../../binutils-2.20.1/bfd/../include -DBINDIR='"/Users/ilg/avr32-tools/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -MT elf32.lo -MD -MP -MF .deps/elf32.Tpo -c -o elf32.lo ../../../binutils-2.20.1/bfd/elf32.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../binutils-2.20.1/bfd -I. -I../../../binutils-2.20.1/bfd -I../../../binutils-2.20.1/bfd/../include -DBINDIR=\"/Users/ilg/avr32-tools/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -MT elf32-avr32.lo -MD -MP -MF .deps/elf32-avr32.Tpo -c ../../../binutils-2.20.1/bfd/elf32-avr32.c -o elf32-avr32.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../binutils-2.20.1/bfd -I. -I../../../binutils-2.20.1/bfd -I../../../binutils-2.20.1/bfd/../include -DBINDIR=\"/Users/ilg/avr32-tools/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -MT elf32.lo -MD -MP -MF .deps/elf32.Tpo -c ../../../binutils-2.20.1/bfd/elf32.c -o elf32.o ../../../binutils-2.20.1/bfd/elf32-avr32.c:168: error: ‘BFD_RELOC_AVR32_DIFF32’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:169: error: ‘BFD_RELOC_AVR32_DIFF16’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:170: error: ‘BFD_RELOC_AVR32_DIFF8’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:171: error: ‘BFD_RELOC_AVR32_GOT32’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:172: error: ‘BFD_RELOC_AVR32_GOT16’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:173: error: ‘BFD_RELOC_AVR32_GOT8’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:175: error: ‘BFD_RELOC_AVR32_21S’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:176: error: ‘BFD_RELOC_AVR32_16U’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:177: error: ‘BFD_RELOC_AVR32_16S’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:178: error: ‘BFD_RELOC_AVR32_SUB5’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:179: error: ‘BFD_RELOC_AVR32_8S_EXT’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:180: error: ‘BFD_RELOC_AVR32_8S’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:182: error: ‘BFD_RELOC_AVR32_22H_PCREL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:183: error: ‘BFD_RELOC_AVR32_18W_PCREL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:184: error: ‘BFD_RELOC_AVR32_16B_PCREL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:185: error: ‘BFD_RELOC_AVR32_16N_PCREL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:186: error: ‘BFD_RELOC_AVR32_11H_PCREL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:187: error: ‘BFD_RELOC_AVR32_10UW_PCREL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:188: error: ‘BFD_RELOC_AVR32_9H_PCREL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:189: error: ‘BFD_RELOC_AVR32_9UW_PCREL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:194: error: ‘BFD_RELOC_AVR32_GOTPC’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:195: error: ‘BFD_RELOC_AVR32_GOTCALL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:196: error: ‘BFD_RELOC_AVR32_LDA_GOT’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:197: error: ‘BFD_RELOC_AVR32_GOT21S’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:198: error: ‘BFD_RELOC_AVR32_GOT18SW’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:199: error: ‘BFD_RELOC_AVR32_GOT16S’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:202: error: ‘BFD_RELOC_AVR32_32_CPENT’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:203: error: ‘BFD_RELOC_AVR32_CPCALL’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:204: error: ‘BFD_RELOC_AVR32_16_CP’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:205: error: ‘BFD_RELOC_AVR32_9W_CP’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:207: error: ‘BFD_RELOC_AVR32_ALIGN’ undeclared here (not in a function) ../../../binutils-2.20.1/bfd/elf32-avr32.c:209: error: ‘BFD_RELOC_AVR32_15S’ undeclared here (not in a function) mv -f .deps/verilog.Tpo .deps/verilog.Plo /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../binutils-2.20.1/bfd -I. -I../../../binutils-2.20.1/bfd -I../../../binutils-2.20.1/bfd/../include -DBINDIR='"/Users/ilg/avr32-tools/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -MT elf.lo -MD -MP -MF .deps/elf.Tpo -c -o elf.lo ../../../binutils-2.20.1/bfd/elf.c In file included from ../../../binutils-2.20.1/bfd/elf32-avr32.c:3915: ./elf32-target.h:635: error: ‘bfd_arch_avr32’ undeclared here (not in a function) ./elf32-target.h:635: error: initializer element is not constant ./elf32-target.h:635: error: (near initialization for ‘elf32_bed.arch’) make[5]: * [elf32-avr32.lo] Error 1 make[5]: * Waiting for unfinished jobs.... mv -f .deps/merge.Tpo .deps/merge.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../binutils-2.20.1/bfd -I. -I../../../binutils-2.20.1/bfd -I../../../binutils-2.20.1/bfd/../include -DBINDIR=\"/Users/ilg/avr32-tools/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -MT elf.lo -MD -MP -MF .deps/elf.Tpo -c ../../../binutils-2.20.1/bfd/elf.c -o elf.o mv -f .deps/dwarf2.Tpo .deps/dwarf2.Plo mv -f .deps/elf32.Tpo .deps/elf32.Plo mv -f .deps/elf.Tpo .deps/elf.Plo make[4]: * [all-recursive] Error 1 make[3]: * [all] Error 2 make[2]: * [all-bfd] Error 2 make[1]: * [all] Error 2 make: *\ [stamps/build-binutils] Error 2 ilg-mbp:jsnyder-avr32-toolchain-b7f5274 ilg$