On 30.04.2017 13:23, Dan Johansson wrote:
> After upgrading GCC to 5.4.0 (from 4.9.3) I can no longer compile my
> sketches.
> 
> At the end of the compile phase a get the following linker error:
> 
> avr-gcc -Os -Wl,--gc-sections -mmcu=atmega32u4 -o
> /tmp/build881550966608502477.tmp/Blinky.cpp.elf
> /tmp/build881550966608502477.tmp/Blinky.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/hsv2rgb.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/wiring.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/colorutils.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/colorpalettes.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/lib8tion.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/FastLED.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/bitswap.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/power_mgt.cpp.o
> /tmp/build881550966608502477.tmp/FastLED313/noise.cpp.o
> /tmp/build881550966608502477.tmp/core.a
> -L/tmp/build881550966608502477.tmp -lm
> /usr/libexec/gcc/avr/ld: cannot find crtatmega32u4.o: No such file or
> directory
> /usr/libexec/gcc/avr/ld: cannot find -latmega32u4
> collect2: error: ld returned 1 exit status
> 
> And sure enough, there is not "crtatmega32u4.o" on this system (and only
> one file with "atmega32u4" in the filename:
> /usr/lib64/gcc/avr/5.4.0/device-specs/specs-atmega32u4).
> 
> I have tried to reinstall the avr-crossdev-toolchain:
> crossdev -C avr
> USE="-openmp -hardened -sanitize -vtv" crossdev -s4 -S --target avr
> ln -s /usr/lib64/binutils/avr/2.26.1/ldscripts /usr/avr/lib/ldscript
> 
> 
> And just to be sure I have also re-emerged:
> dev-embedded/avrdude
> dev-embedded/arduino
> 
> Any suggestions what I am missing?
> 

With last nights sync, avr-gcc-4.9.4 was pulled back in (slotted).

Selecting 4.9.4 instead of 5.4.0 solves the issue, I can now compile for
avr again:

$ avr-gcc -Os -Wl,--gc-sections -mmcu=atmega32u4 test.c

$ file a.out
a.out: ELF 32-bit LSB executable, Atmel AVR 8-bit, version 1 (SYSV),
statically linked, not stripped

-- 
D/\N
***************************************************
This message is printed on 100% recycled electrons!
***************************************************

Reply via email to