diff --git a/Formula/gcc.rb b/Formula/gcc.rb index 4b662a8bbd..f108aa0a08 100644 --- a/Formula/gcc.rb +++ b/Formula/gcc.rb @@ -73,7 +73,11 @@ class Gcc < Formula end def version_suffix - version.to_s.slice(/\d/) + if build.head? + (stable.version.to_s.slice(/\d/).to_i + 1).to_s + else + version.to_s.slice(/\d/) + end end # Fix for libgccjit.so linkage on Darwin