Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Library/Homebrew/compilers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# frozen_string_literal: true

module CompilerConstants
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
Copy link
Member Author

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.

Copy link
Member Author

@cho-m cho-m Sep 2, 2024

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/

Copy link
Member

@Bo98 Bo98 Sep 3, 2024

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).

Copy link
Member

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.

GNU_GCC_REGEXP = /^gcc-(#{GNU_GCC_VERSIONS.join("|")})$/
COMPILER_SYMBOL_MAP = {
"gcc" => :gcc,
"clang" => :clang,
Expand Down
1 change: 0 additions & 1 deletion Library/Homebrew/shims/linux/super/gcc-4.2

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/linux/super/gcc-4.9

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/linux/super/gcc-5

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/linux/super/gcc-6

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/linux/super/llvm-gcc-4.2

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/mac/super/gcc-4.2

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/mac/super/gcc-4.9

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/mac/super/gcc-5

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/mac/super/gcc-6

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/mac/super/llvm-gcc-4.2

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/super/gcc-4.9

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/super/gcc-5

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/super/gcc-6

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion Library/Homebrew/shims/super/llvm-gcc-4.2

This file was deleted.