Repository navigation
avr: provide errno storage - #208
Open
Firat17aze wants to merge 1 commit into
Open
Firat17aze wants to merge 1 commit into
Firat17aze wants to merge 1 commit into
Conversation
AVR programs include the shared errno header, which calls __errno_location, but the AVR-only libc archive did not define it. A read or write of errno therefore left firmware with an undefined symbol. Add one program-wide value for the single-threaded AVR runtime and exercise it in the AVR libc QEMU test at -O0 and -Os. Validation: make rt-embedded; PATH=/opt/homebrew/opt/llvm/bin:$PATH sh tests/golden/avr-libc-run.sh. The latter failed to link before this change and passes on QEMU after it.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #206.
AVR firmware uses the shared
<errno.h>, whereerrnocalls__errno_location, but the AVR-only libc archive had no implementation. Any read or write therefore left an undefined symbol at link time.This adds one program-wide value for AVR, documents that runtime model, and extends the existing AVR libc test to write and read
errnoat both-O0and-Os.Validation:
make rt-embeddedPATH=/opt/homebrew/opt/llvm/bin:$PATH sh tests/golden/avr-libc-run.sh— passed on QEMU ATmega328P at-O0and-Os, including archive-isolation checksgit diff --check— passedmake check— started from a clean host-library build, but stopped after nine minutes during the unrelated serial x86-64 libc build; no failure had occurred and the execution suite had not startedNo physical AVR board was available; validation was limited to the repository’s QEMU ATmega328P harness.
LLMs were used for review and code generation in some parts of this pull request.