osx-cross / homebrew-arm

Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7).
BSD 2-Clause "Simplified" License
152 stars 21 forks source link

Make all recipes keg-only. #56

Open tom-radar opened 1 year ago

tom-radar commented 1 year ago

The homebrew-core now includes arm-none-eabi-X recipes and this repositories gcc-arm@gcc10 is not keg-only and now conflicts.

See https://github.com/Homebrew/homebrew-core/pull/138370

What do you think?

ladislas commented 1 year ago

That's good news for user, though I'm surprised it's "that" simple to build gcc for arm-none-eabi. My understanding was that ARM process was very complicated.

I'm not totally sold on having all our formulas keg-only but I'll review a PR while I think about it.

@fauxpark @salkinium what do you think?

fauxpark commented 1 year ago

That formula seems almost completely useless, it does not include newlib or multilib, or pretty much anything as far as I can tell. I tried installing it and test compiling a QMK firmware, it can't even find stdint.h (although it is present under lib/gcc/arm-none-eabi/13.2.0/include/stdint.h?).

My understanding was that ARM process was very complicated.

The main reason this is so "complicated" to build is because in order to build a useful arm-none-eabi-gcc, you probably want newlib... which needs GCC... so the formula first compiles a rather minimal GCC (much like what was submitted to homebrew-core) to bootstrap everything.

Apart from that, from what I understand, building GCC is about as straightforward as it usually is.

tom-radar commented 1 year ago

I guess this will require a bit more thinking. I have not tried the new homebrew-core recipes yet.

fauxpark commented 1 year ago

It looks like all of the formulae here are already keg-only, with the exception of arm-gcc-bin@10. This is what the arm-gcc-bin alias is pointing to, and presumably why it is not also keg-only, despite being a versioned formula?

In any case it still conflicts with everything else in this tap, regardless of the new formulae in homebrew-core.

tom-radar commented 1 year ago

Right. arm-gcc-bin@10 is not key-only and conflicts with the new formula in homebrew-core.

In any case it still conflicts with everything else in this tap, regardless of the new formulae in homebrew-core.

Does it? You can run any of the key-only versions by pointing to the right gcc binary in the /opt/homebrew/opt directory structure. The arm-gcc-bin@10 was kept not keg-only intentionally (see https://github.com/osx-cross/homebrew-arm/pull/50#issuecomment-1513345266) as it was the desired default version by the maintainer of this repository.

fauxpark commented 1 year ago

I mean, that's why they are all keg-only except one.

Perhaps it is time to move these formulae to homebrew-core? They at least have access to M1 runners for building bottles :)