mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
a35ed2f9eb
This fixes the [build error] caused by the `avr-gcc` (used as linker) not being available in the Rust CI. This is a viable solution, which shows the wrong/right behavior and, since no functions from `libgcc` are called, does not produce errors. This was discussed [here]. Another small problem is, that `lld` doesn't link the correct startup-code by default. This is not a problem for this test (since it does not actually use anything the startup code is needed for (no variables, no stack, no interrupts)), but this causes the `main`-function to be removed by the default flag `--gc-sections`. Therefore the `rmake`-driver also adds the linker flag `--entry=main` to mark the `main`-function as the entry point and thus preventing it from getting removed. The code would work on a real AVR device. [build error]: https://github.com/rust-lang/rust/pull/131755#issuecomment-2415127952 [here]: https://github.com/rust-lang/rust/pull/131755#issuecomment-2416469675 |
||
---|---|---|
.. | ||
avr-rjmp-offsets.rs | ||
rmake.rs |