toolchain_source_1.1.0 source doesn't build...

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

See details in the Ubuntu thread ... binutils is missing some essential #defines, for starters. Are there patches available (yet) to fix this?

Best of course would be to deliver the toolchain as patches against base toolchain versions, rather than as a big tarball. You'll need such patches in any case, to be able to merge upstream. :)

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

Found a patch at https://dev.openwrt.org/browser/... ... which applied against binutils-2.17 and didn't need the autoreconf step(s). Diffstat:

 bfd/Makefile.in            |   18 
 bfd/aclocal.m4             |    4 
 bfd/bfd-in2.h              |   84 
 bfd/config.in              |   12 
 bfd/configure              |10959 ++++++++++++++++++++++---------------------
 bfd/configure.in           |    2 
 bfd/doc/Makefile.in        |   30 
 bfd/doc/bfd.info           |  128 
 bfd/elf32-avr32.c          |   75 
 bfd/libbfd.h               |   41 
 binutils/Makefile.in       |   11 
 binutils/config.in         |    6 
 binutils/configure         | 8840 ++++++++++++++++++-----------------
 binutils/doc/Makefile.in   |   19 
 binutils/doc/binutils.info |   61 
 configure                  |  306 -
 gas/Makefile.in            |   27 
 gas/config.in              |    6 
 gas/configure              |11262 +++++++++++++++++++++++----------------------
 gas/doc/Makefile.in        |   20 
 gas/doc/as.info            |  920 +--
 ld/Makefile.in             |   36 
 ld/config.in               |    6 
 ld/configure               | 8373 +++++++++++++++++----------------
 ld/ld.info                 |  156 
 opcodes/Makefile.in        |   31 
 opcodes/aclocal.m4         |    4 
 opcodes/config.in          |    6 
 opcodes/configure          | 7541 ++++++++++++++++--------------
 29 files changed, 25506 insertions(+), 23478 deletions(-)

Obviously most of those changes are from having a working configure mechanism. But I suppose the -DDHRYSTONE_FIX stuff would look a bit fishy if one were to submit it to the binutils maintainers... :lol:

Attachment(s): 

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

OK, next: try building GCC. Instructions at https://www.avrfreaks.net/wiki/in... were incomplete ... the bootstrap compiler also needs "--disable-libssp", which (like libmudflap) would also be a target library depending on the C library.

By the way, googling reports to me that "The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations." So that's what it does. Now, what does "libssp" do? Seems to be some kind of stack smash protection thingie... more runtime checks.

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

This is a bit of a weird thing actually.. I had to add the libmudflap bit to my configure line when the Atmel boys didn't. You had to add the libssp stuff to the config line when neither myself nor the Atmel boys did. I wonder what causes these bits to suddenly become an issue.. :/

Out of interest, what is the rest of your configure line, the same as suggested in the Getting Started guide?

-S.

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

I configured gcc with (cut/paste from BASH history):

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

The SSP failure was caused by configuration not finding unistd.h or fcntl.h so the build broke because open() and its flags weren't available.

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

No worries, have added that switch to the suggested compile line on both the 'freaks and avr32linux wiki getting started guides. Thanks :)

-S.

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

Well, I seem to have the bootstrap compiler and uClibc 0.9.28.3 going (haven't tried running compiler output yet though) ... and then

/..elided../avr32/toolchain_1.10/obj.gcc-full/./gcc/xgcc -B/..elided../avr32/toolchain_1.10/obj.gcc-full/./gcc/ -B/usr/local/avr32/avr32-linux/bin/ -B/usr/local/avr32/avr32-linux/lib/ -isystem /usr/local/avr32/avr32-linux/include -isystem /usr/local/avr32/avr32-linux/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-4.1.2-atmel.1.0.0/libmudflap -I. -Wall -ffunction-sections -fdata-sections -O2 -g -O2 -MT mf-heuristics.lo -MD -MP -MF .deps/mf-heuristics.Tpo -c ../../../gcc-4.1.2-atmel.1.0.0/libmudflap/mf-heuristics.c  -fPIC -DPIC -o .libs/mf-heuristics.o
../../../gcc-4.1.2-atmel.1.0.0/libmudflap/mf-heuristics.c: In function '__mf_heuristic_check':
../../../gcc-4.1.2-atmel.1.0.0/libmudflap/mf-heuristics.c:175: internal compiler error: in compute_frame_pointer_to_cfa_displacement, at dwarf2out.c:10469
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[4]: *** [mf-heuristics.lo] Error 1

So it's not entirely working quite yet. ISTR seeing AVR8 code trip over the identical dwarf2 issue before ... it would be a 420+ KByte source file that chokes!