-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
compilers: drop support for GCC 4.9, 5 and 6 #18127
base: master
Are you sure you want to change the base?
Conversation
b9b144b
to
378e8cf
Compare
LGTM but might need to wait for the next minor release as this is technically a breaking change? |
I don't feel strongly either way. I'd be amazed if there's people relying on GCC 4.9 support given it's been removed for a while. |
System GCC also counts here but yeah. If we're planning to also drop 5 and 6 maybe it's worth doing it all at the same time which is probably roughly when we'd do a minor release anyway. |
Did we support using old system GCC? I guess this could impact someone still running something like Ubuntu 14.04 LTS or RHEL7/DTS3. That would probably be an awful experience as various formulae have moved to C++17 (e.g. working on ICU 75 PR which makes C++17 a minimum deep in the dependency tree).
Makes sense. I was thinking of how many to drop but went conservative with only 4.9. Minimum GCC 7 may allow cleaning up some |
For Homebrew/core, not really. Can override it with Third party taps are however free to use their own policies and CI images. We recommend aligning with Homebrew/core but do not require it. |
I'll split out documentation changes to separate PR so this only touches EDIT: #18228 |
378e8cf
to
d9edeb2
Compare
GNU_GCC_VERSIONS = %w[4.9 5 6 7 8 9 10 11 12 13 14].freeze | ||
GNU_GCC_REGEXP = /^gcc-(4\.9|[5-9]|10|11|12|13|14)$/ | ||
GNU_GCC_VERSIONS = %w[7 8 9 10 11 12 13 14].freeze |
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.
4.9 (removed) and 5 & 6 (planned to remove in October). May need to check on which LTS distros this will impact.
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.
Rough estimates for some common older Linux:
Analytics | Distro | EOL? | GCC |
---|---|---|---|
12 | Amazon Linux 2 | GCC 7 | |
13 | Ubuntu 18.04 | 2028 | GCC 7 |
25 | CentOS Linux 7 | 2024 | GCC 4.8 |
34 | Ubuntu 16.04 | 2026 | GCC 5 |
37, 40, 60 | RHEL 8 | 2032 | GCC 8 or 9 |
128 | RHEL 7 | 2026 | GCC 4.8 |
347 | Debian 8 Buster | 2025 | GCC 8 |
I didn't see any usage of GCC 4.9 or 6 from quick glance.
GCC 5 could impact Ubuntu 16 users and was our original default prior to newer Ubuntu/toolchain.
EDIT: Do we have analytics for GCC actually used? We strip out the --cc
value in https://formulae.brew.sh/analytics/brew-command-run-options/365d/
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.
Do we have analytics for GCC actually used?
Unfortunately not. Stripping out arg values is intended behaviour because they are not validated so could contain any input. Though --cc
isn't the only way it can be used as formulae can do e.g. ENV.public_send(:"gcc-5")
(horrible API we should really fix but whatever it's public API nonetheless).
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.
Do we have analytics for GCC actually used?
Could probably infer some of this from https://formulae.brew.sh/analytics/os-version/365d/
I think it'd be reasonable to require a GCC 7 minimum version for Homebrew based on the above. We already enforce relatively newer curl
and git
.
For when we merge this, it might be worth dropping the |
Forgot about those. Will update PR to remove them. Also, unrelated to this PR, was looking at shims and noticed we still have some old Apple GCC 4.2 shims. Is there any use for these? |
Minimum Xcode we support is 7.3 so probably can be removed. I guess technically speaking a formula or build-script could rely on them my invoking |
d9edeb2
to
af08745
Compare
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?GCC 4.9 was removed.
GCC 5-8 are all disabled:
More in line with https://docs.brew.sh/Manpage#install-options-formulacask-