From 4cec6f5dd0aed2ece19b5d3e755d7da7d4178b13 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Tue, 13 Sep 2016 15:03:37 -0400 Subject: [PATCH] Teach brew to recognize gcc-HEAD as valid compiler Building gcc with --HEAD results in most of the executables not having a version suffix, e.g. Building/installing gcc 6 would result in gcc-6, g++-6, etc. being installed, while building/installing gcc --HEAD would result in gcc-, g++-, etc. being installed. The lack of a version suffix prevented brew from recognizing a valid gcc install, resulting in brew instructing users to install gcc before building certain formulae even though gcc is installed. A patch to the gcc formula makes the version number for --HEAD builds the major version number of the stable version + 1 (7 at this time). This patch teaches brew to recognize current --HEAD builds as valid compilers. --- Library/Homebrew/compilers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb index 51f0919e56..b8bc708fab 100644 --- a/Library/Homebrew/compilers.rb +++ b/Library/Homebrew/compilers.rb @@ -1,7 +1,7 @@ # @private module CompilerConstants - GNU_GCC_VERSIONS = %w[4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 6] - GNU_GCC_REGEXP = /^gcc-(4\.[3-9]|[5-6])$/ + GNU_GCC_VERSIONS = %w[4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 6 7] + GNU_GCC_REGEXP = /^gcc-(4\.[3-9]|[5-7])$/ COMPILER_SYMBOL_MAP = { "gcc-4.0" => :gcc_4_0, "gcc-4.2" => :gcc,