diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb index 761700b17c..7f95f25b83 100644 --- a/Library/Homebrew/compilers.rb +++ b/Library/Homebrew/compilers.rb @@ -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, diff --git a/Library/Homebrew/development_tools.rb b/Library/Homebrew/development_tools.rb index aed19cc8d7..456a156871 100644 --- a/Library/Homebrew/development_tools.rb +++ b/Library/Homebrew/development_tools.rb @@ -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 diff --git a/Library/Homebrew/extend/os/linux/install.rb b/Library/Homebrew/extend/os/linux/install.rb index 694e2a5cc5..bb830d2dc1 100644 --- a/Library/Homebrew/extend/os/linux/install.rb +++ b/Library/Homebrew/extend/os/linux/install.rb @@ -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", diff --git a/Library/Homebrew/shims/linux/super/g++-10 b/Library/Homebrew/shims/linux/super/g++-10 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/Library/Homebrew/shims/linux/super/g++-10 @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/Library/Homebrew/shims/linux/super/gcc-10 b/Library/Homebrew/shims/linux/super/gcc-10 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/Library/Homebrew/shims/linux/super/gcc-10 @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/Library/Homebrew/shims/mac/super/g++-10 b/Library/Homebrew/shims/mac/super/g++-10 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/Library/Homebrew/shims/mac/super/g++-10 @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/Library/Homebrew/shims/mac/super/gcc-10 b/Library/Homebrew/shims/mac/super/gcc-10 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/Library/Homebrew/shims/mac/super/gcc-10 @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc index 212271727e..b6249a04f4 100755 --- a/Library/Homebrew/shims/super/cc +++ b/Library/Homebrew/shims/super/cc @@ -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 diff --git a/Library/Homebrew/shims/super/g++-10 b/Library/Homebrew/shims/super/g++-10 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/Library/Homebrew/shims/super/g++-10 @@ -0,0 +1 @@ +cc \ No newline at end of file diff --git a/Library/Homebrew/shims/super/gcc-10 b/Library/Homebrew/shims/super/gcc-10 new file mode 120000 index 0000000000..2652f5f42c --- /dev/null +++ b/Library/Homebrew/shims/super/gcc-10 @@ -0,0 +1 @@ +cc \ No newline at end of file