platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
138 stars 105 forks source link

Atmel AVR toolchain supports LTO only partially #33

Closed zgoda closed 6 years ago

zgoda commented 7 years ago

Latest updates to AVR toolchain include LTO support in GCC, and compiler works indeed fine producing smaller object code. Unfortunately other tools such as nm (found in $HOME/.platformio/packages/toolchain-atmelavr/bin/avr-nm) does not support reading LTO object files, for example when trying to display symbols:

Print.o:
/home/jazg/.platformio/packages/toolchain-atmelavr/bin/avr-nm: Print.o: plugin needed to handle lto object
00000001 C __gnu_lto_slim
00000001 C __gnu_lto_v1
0000003e a __SP_H__
0000003d a __SP_L__
0000003f a __SREG__
00000000 a __tmp_reg__
00000001 a __zero_reg__
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/42199437-atmel-avr-toolchain-supports-lto-only-partially?utm_campaign=plugin&utm_content=tracker%2F38207915&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38207915&utm_medium=issues&utm_source=github).
ladislas commented 6 years ago

@zgoda If you want to use the latest toolchain from osx-cross/avr, you can use this port of the platform: osx-cross/platform-osxcrossavr.

ivankravets commented 6 years ago

Should be fixed in the latest toolchains.