Skip to content

Commit

Permalink
Merge pull request #7468 from runlevel5/support-gcc-10
Browse files Browse the repository at this point in the history
Support GCC 10
  • Loading branch information
MikeMcQuaid authored May 1, 2020
2 parents 3e20393 + 3de9fc9 commit a2d4114
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 5 deletions.
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 @@

# @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
Original file line number Diff line number Diff line change
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]
Version.new build_version
else
Version::NULL
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/extend/os/linux/install.rb
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit a2d4114

Please sign in to comment.