Description
Hey guys,
I recently got a TU for archlinux which means I can now package arduino for archlinux. The question came up if archlinux should link avr-gcc
and/or avrdude
and/or arduino-builder
with the distribution/upstream packages.
I'd like to present my opinion on this, but also would like to hear other opinions, as I might be wrong. It would be nice if one of you guys could answer, as I think you should know it best: @cmaglie @facchinm @sandeepmistry @matthijskooijman @focalintend @kriegsman
My opinion is to not package the upstream tools.
- Compilation size differs
- Assemler code differs, makes it hard to debug
- Compiler specific code as in fastled could break
- New avrlibc definitions might give problems
- Reverting of avrdude already showed such problems
- Atmel also uses 4.9.x which is quite new if you ask me
- If you really want the latest avr-gcc you can use a makefile or change platform.txt
As a side note: We currently package avrdude 6.3 because of a dependency issue, but that is only temporary.
Edit:
I've linked all the binaries to the upstream avr-gcc and such errors then occur:
MouseAPI.h:43:19: error: flexible array member in union
uint16_t whole16[];
This might be a feature of the new avr-gcc but the library itself is broken. And if you use the library manager, its quite trickey to always fix the bugs yourself. And now tell the maintainer to fix those bugs for you avr-gcc 6.x just because you are using arch and the whole world uses the bundled avr-gcc. Those error appear with my own HID library. (I should fix this anyways).
Edit2:
And with other sketches I got LTO problems. This might be because I am linking to the wrong pathes or the platform.txt also needs modifications because it uses the wrong parameters.
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: fatal error: /usr/share/arduino/hardware/tools/avr/bin/avr-gcc returned 1 exit status
compilation terminated.
/usr/bin/avr-ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status