Commit graph

8 commits

Author SHA1 Message Date
Bennet Bleßmann
7dd57f085c
update/bless tests 2025-04-06 21:41:47 +02:00
Patryk Wychowaniec
d5128f9274
avr-rjmp-offset: Explain .target_cpu() 2025-02-20 15:05:06 +01:00
Patryk Wychowaniec
78ddabf31d
Create a generic AVR target: avr-none
This commit removes the `avr-unknown-gnu-atmega328` target and replaces
it with a more generic `avr-none` variant that must be specialized with
the `-C target-cpu` flag (e.g. `-C target-cpu=atmega328p`).
2025-02-19 19:01:51 +01:00
Chris Denton
787b795d14
Only ignore windows-gnu in avr-jmp-offset 2024-11-26 21:08:33 +00:00
Jieyou Xu
3a42fd2bdc tests: disable avr-rjmp-offset on Windows for now
The linker has been randomly crashing on `x86_64-mingw` that's causing
spurious failures. Disable this test on Windows for now.
2024-11-26 07:56:32 +08:00
Julian Frimmel
a35ed2f9eb
Use rust-lld instead of avr-gcc as the linker
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
2024-10-17 09:00:08 +02:00
Julian Frimmel
bb8db13892
Simplify test and make it more reliable
The new `rmake`-content asserts the exact assembly sequence for the loop
preventing false-negatives if some instructions would change and thus
the label offset might need to change.
2024-10-16 18:58:17 +02:00
Julian Frimmel
ab008414d4
Convert to a rmake-test
Since the `tests/assembly` use `emit=asm`, the issue is not observable
as reported in the linked issue. Therefore the existing test case is
converted and a simple `rmake`-test is added. The test only checks, if
the correct `rjmp`-offset is used.
2024-10-16 18:58:17 +02:00