New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avr-*: split avr-gcc-libc into separate packages #29007
Conversation
- avr-gcc 5.3.0 -> 5.4.0 closes NixOS#28220 Since the packages do not share a common prefix anymore, you need to define the current store paths in your project's Makefile. Example for an atmega644 build: CFLAGS += -I /nix/store/9rffxzds5crcpm76g3nr03jx0aa657cf-avr-libc-2.0.0/avr/include CFLAGS += -B /nix/store/9rffxzds5crcpm76g3nr03jx0aa657cf-avr-libc-2.0.0/avr/lib/avr5 CFLAGS += -L /nix/store/9rffxzds5crcpm76g3nr03jx0aa657cf-avr-libc-2.0.0/avr/lib/avr5 CFLAGS += -L /nix/store/8409dj9js4i5901i63275wxdm783l0p6-avr-gcc-5.4.0/lib/gcc/avr/5.4.0/avr5
Don't pull yet. There are still some dependencies that need to be fixed |
The binaries work / compile. I am unsure whether the library path needs to be fixed for avr-gcc / avr-libc or not. avr-gcc needs specific includes for the microcontroller used. If a |
I can confirm that my own project at danielfullmer/tmk_keyboard builds with this PR---with the addition of the mcu-specific CFLAGS as described in 6a458c1. I agree, it would be much more convenient if avr-gcc can just figure out the correct includes as it seemed to do previously. Also, is this going to change again when @Ericson2314 's cross-compilation PRs are all merged? It would be nice if whatever interface we expose can remain constant for downstream derivations. For instance, would it be valuable to keep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope that once I'm done, we can get rid of this and just use normal gcc + avr libc. Until then, though, this is definitely an improvement. Thanks!
@danielfullmer Thanks for testing! Let's see whether we can figure out how to get this |
Motivation for this change
the avr toolchain was broken on master
Issue: #28220
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)Compiled a small AVR binary.
CC @danielfullmer Could you please test against your project?