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

Support GCC 10 #7468

Merged
merged 4 commits into from May 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Library/Homebrew/compilers.rb
Expand Up @@ -2,8 +2,8 @@

# @private
module CompilerConstants
GNU_GCC_VERSIONS = %w[4.9 5 6 7 8 9].freeze
GNU_GCC_REGEXP = /^gcc-(4\.9|[5-9])$/.freeze
GNU_GCC_VERSIONS = %w[4.9 5 6 7 8 9 10].freeze
GNU_GCC_REGEXP = /^gcc-(4\.9|[5-9]|10)$/.freeze
COMPILER_SYMBOL_MAP = {
"gcc" => :gcc,
"clang" => :clang,
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/development_tools.rb
Expand Up @@ -78,7 +78,7 @@ def non_apple_gcc_version(cc)
path = HOMEBREW_PREFIX/"opt/gcc/bin"/cc
path = locate(cc) unless path.exist?
version = if path &&
build_version = `#{path} --version`[/gcc(?:(?:-\d(?:\.\d)?)? \(.+\))? (\d\.\d\.\d)/, 1]
build_version = `#{path} --version`[/gcc(?:(?:-\d(?:\.\d)?)? \(.+\))? (\d+\.\d\.\d)/, 1]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI

$ gcc --version
gcc (GCC) 10.0.1 20200328 (Red Hat 10.0.1-0.11)

Version.new build_version
else
Version::NULL
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/extend/os/linux/install.rb
Expand Up @@ -6,6 +6,7 @@ module Install

DYNAMIC_LINKERS = [
"/lib64/ld-linux-x86-64.so.2",
"/lib64/ld64.so.2",
"/lib/ld-linux.so.3",
"/lib/ld-linux.so.2",
"/lib/ld-linux-aarch64.so.1",
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/shims/linux/super/g++-10
1 change: 1 addition & 0 deletions Library/Homebrew/shims/linux/super/gcc-10
1 change: 1 addition & 0 deletions Library/Homebrew/shims/mac/super/g++-10
1 change: 1 addition & 0 deletions Library/Homebrew/shims/mac/super/gcc-10
4 changes: 2 additions & 2 deletions Library/Homebrew/shims/super/cc
Expand Up @@ -76,13 +76,13 @@ class Cmd
when "cpp" then "cpp"
when /llvm_(clang(\+\+)?)/
"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm/bin/#{$1}"
when /\w\+\+(-\d(\.\d)?)?$/
when /\w\+\+(-\d+(\.\d)?)?$/
case ENV["HOMEBREW_CC"]
when /clang/
"clang++"
when /llvm-gcc/
"llvm-g++-4.2"
when /(g)?cc(-\d(\.\d)?)?$/
when /(g)?cc(-\d+(\.\d)?)?$/
"g++" + $2.to_s
end
else
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/shims/super/g++-10
1 change: 1 addition & 0 deletions Library/Homebrew/shims/super/gcc-10