about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-27 15:48:56 +0000
committerbors <bors@rust-lang.org>2020-08-27 15:48:56 +0000
commit3d0c847d3353e319ed82598a106e28fd490caa6b (patch)
tree35e6357444c3d1fb46c52eeaa80a67b79966c3ca /compiler/rustc_codegen_llvm/src
parent118860a7e76daaac3564c7655d46ac65a14fc612 (diff)
parentc9ead8c895593452677a229fd19909c83283b33f (diff)
downloadrust-3d0c847d3353e319ed82598a106e28fd490caa6b.tar.gz
rust-3d0c847d3353e319ed82598a106e28fd490caa6b.zip
Auto merge of #74941 - dylanmckay:replace-broken-avr-unknown-unknown-target, r=oli-obk
[AVR] Replace broken 'avr-unknown-unknown' target with 'avr-unknown-gnu-atmega328' target

The `avr-unknown-unknown` target has never worked correctly, always trying to invoke
the host linker and failing. It aimed to be a mirror of AVR-GCC's
default handling of the `avr-unknown-unknown' triple (assume bare
minimum chip features, silently skip linking runtime libraries, etc).
This behaviour is broken-by-default as it will cause a miscompiled executable
when flashed.

This patch improves the AVR builtin target specifications to instead
expose only a 'avr-unknown-gnu-atmega328' target. This target system is
`gnu`, as it uses the AVR-GCC frontend along with avr-binutils. The
target triple ABI is 'atmega328'.

In the future, it should be possible to replace the dependency on
AVR-GCC and binutils by using the in-progress AVR LLD and compiler-rt support.
Perhaps at that point it would make sense to add an
'avr-unknown-unknown-atmega328' target as a better default when
implemented.

There is no current intention to add in-tree AVR target specifications for other
AVR microcontrollers - this one can serve as a reference implementation
for other devices via `rustc --print target-spec-json
avr-unknown-gnu-atmega328p`.

There should be no users of the existing 'avr-unknown-unknown' Rust
target as a custom target specification JSON has always been
recommended, and the avr-unknown-unknown target could never pass the
linking step anyway.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions