fix(native_comp): Improve ./install-patched-gcc helper

Instead of just installing a pre-patched gcc formula, copy the local
formula from Homebrew and apply a patch to it, before then installing
it. This should be a lot more future-proof.
This commit is contained in:
2020-08-18 02:20:18 +01:00
parent f7b0c16db8
commit a8d4db284c
5 changed files with 55 additions and 162 deletions

21
Formula/gcc.rb.patch Normal file
View File

@@ -0,0 +1,21 @@
diff --git a/Formula/gcc.rb b/Formula/gcc.rb
index 1bd636d496..03ad124218 100644
--- a/Formula/gcc.rb
+++ b/Formula/gcc.rb
@@ -53,7 +53,7 @@ class Gcc < Formula
# - Ada, which requires a pre-existing GCC Ada compiler to bootstrap
# - Go, currently not supported on macOS
# - BRIG
- languages = %w[c c++ objc obj-c++ fortran]
+ languages = %w[c c++ objc obj-c++ fortran jit]
osmajor = `uname -r`.split(".").first
pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip
@@ -73,6 +73,7 @@ class Gcc < Formula
--with-system-zlib
--with-pkgversion=#{pkgversion}
--with-bugurl=https://github.com/Homebrew/homebrew-core/issues
+ --enable-host-shared
]
# Xcode 10 dropped 32-bit support