Instead of relying on patching the Arduino's avr6.xn linker script
(which is required for the custom language data sections), provide the
linker script and use linker flags in boards.txt to use it.
This *greatly* simplifies the installation and usage of Arduino, and
also ensures the firmware is always built correctly, since a missing
section will result in a non-working firmware which is difficult to
diagnose.
- Remove unnecessary warning flags during linking stage
- Remove -fuse-linker-plugin, implied by -flto at link time
- Remove -fpermissive to avoid future warning creep (depends on https://github.com/prusa3d/Prusa-Firmware/pull/2405)
- Add -fno-rtti for c++ (no savings, just to avoid future usage of rtti)
Some randomness is used by gcc when generating symbol names, unique
values and for LTO.
Provide a constant value based on the object file name in order to avoid
object files changing build-to-build, making debugging/disassembly
easier.
- for testing the JSON file is linked to 3d-gussner/Arduino_boards/Prusa_Merge_v1.0.3 branch
- after testing it will point to prusa3d/Arduino_boards/master