This is modified version of official homebrew gcc@4.9, which only supports up to mac os x 10.13. build on mac osx 10.14 or higher needs this new patch
Download and put gcc@4.9_os_ge_mojave.rb to /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
Run brew install gcc@4.9_os_ge_mojave