Merge pull request #7468 from runlevel5/support-gcc-10

Support GCC 10
This commit is contained in:
Mike McQuaid 2020-05-01 08:27:35 +01:00 committed by GitHub
commit a2d4114089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 5 deletions

View File

@ -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,

View File

@ -78,7 +78,7 @@ class DevelopmentTools
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

View File

@ -6,6 +6,7 @@ module Homebrew
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",

View File

@ -0,0 +1 @@
cc

View File

@ -0,0 +1 @@
cc

View File

@ -0,0 +1 @@
cc

View File

@ -0,0 +1 @@
cc

View File

@ -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

View File

@ -0,0 +1 @@
cc

View File

@ -0,0 +1 @@
cc