1 |
On 30.04.2017 13:23, Dan Johansson wrote: |
2 |
> After upgrading GCC to 5.4.0 (from 4.9.3) I can no longer compile my |
3 |
> sketches. |
4 |
> |
5 |
> At the end of the compile phase a get the following linker error: |
6 |
> |
7 |
> avr-gcc -Os -Wl,--gc-sections -mmcu=atmega32u4 -o |
8 |
> /tmp/build881550966608502477.tmp/Blinky.cpp.elf |
9 |
> /tmp/build881550966608502477.tmp/Blinky.cpp.o |
10 |
> /tmp/build881550966608502477.tmp/FastLED313/hsv2rgb.cpp.o |
11 |
> /tmp/build881550966608502477.tmp/FastLED313/wiring.cpp.o |
12 |
> /tmp/build881550966608502477.tmp/FastLED313/colorutils.cpp.o |
13 |
> /tmp/build881550966608502477.tmp/FastLED313/colorpalettes.cpp.o |
14 |
> /tmp/build881550966608502477.tmp/FastLED313/lib8tion.cpp.o |
15 |
> /tmp/build881550966608502477.tmp/FastLED313/FastLED.cpp.o |
16 |
> /tmp/build881550966608502477.tmp/FastLED313/bitswap.cpp.o |
17 |
> /tmp/build881550966608502477.tmp/FastLED313/power_mgt.cpp.o |
18 |
> /tmp/build881550966608502477.tmp/FastLED313/noise.cpp.o |
19 |
> /tmp/build881550966608502477.tmp/core.a |
20 |
> -L/tmp/build881550966608502477.tmp -lm |
21 |
> /usr/libexec/gcc/avr/ld: cannot find crtatmega32u4.o: No such file or |
22 |
> directory |
23 |
> /usr/libexec/gcc/avr/ld: cannot find -latmega32u4 |
24 |
> collect2: error: ld returned 1 exit status |
25 |
> |
26 |
> And sure enough, there is not "crtatmega32u4.o" on this system (and only |
27 |
> one file with "atmega32u4" in the filename: |
28 |
> /usr/lib64/gcc/avr/5.4.0/device-specs/specs-atmega32u4). |
29 |
> |
30 |
> I have tried to reinstall the avr-crossdev-toolchain: |
31 |
> crossdev -C avr |
32 |
> USE="-openmp -hardened -sanitize -vtv" crossdev -s4 -S --target avr |
33 |
> ln -s /usr/lib64/binutils/avr/2.26.1/ldscripts /usr/avr/lib/ldscript |
34 |
> |
35 |
> |
36 |
> And just to be sure I have also re-emerged: |
37 |
> dev-embedded/avrdude |
38 |
> dev-embedded/arduino |
39 |
> |
40 |
> Any suggestions what I am missing? |
41 |
> |
42 |
|
43 |
With last nights sync, avr-gcc-4.9.4 was pulled back in (slotted). |
44 |
|
45 |
Selecting 4.9.4 instead of 5.4.0 solves the issue, I can now compile for |
46 |
avr again: |
47 |
|
48 |
$ avr-gcc -Os -Wl,--gc-sections -mmcu=atmega32u4 test.c |
49 |
|
50 |
$ file a.out |
51 |
a.out: ELF 32-bit LSB executable, Atmel AVR 8-bit, version 1 (SYSV), |
52 |
statically linked, not stripped |
53 |
|
54 |
-- |
55 |
D/\N |
56 |
*************************************************** |
57 |
This message is printed on 100% recycled electrons! |
58 |
*************************************************** |