osx-cross / homebrew-avr

Homebrew AVR Toolchain
BSD 2-Clause "Simplified" License
393 stars 79 forks source link

Get all versions of GCC working on Apple ARM systems. #249

Closed DavidEGrayson closed 3 years ago

DavidEGrayson commented 3 years ago

This just takes the changes that we did to avr-gcc@11 for ARM support and applies them to all the other GCC versions.

The patch I used for GCC 11 happens to work for all the other versions, and I tested that it is at least necessary for GCC 9. I assume it is necessary for all the other versions too.

I did not test this pull request out on any hardware, but after installing the formulas successfuly on an M1 Mac Mini, I ran these commands successfully:

brew test ./Formula/avr-gcc@*
brew audit ./Formula/avr-gcc@*
brew style ./Formula/avr-gcc@*

I also used commands like diff -ur avr-gcc@11.rb avr-gcc@9.rb to make sure that I remembered to apply all the changes.

And I added GCC 11 and GCC 5 to the README since it seems like they were missing.

ladislas commented 3 years ago

Thanks @DavidEGrayson! It would be better to do separate PRs for each formula, because CI will try to build them all and it will take forever...

DavidEGrayson commented 3 years ago

Great, thank you!