go: fix generating malformed binaries

This commit is contained in:
Misty De Meo 2019-06-19 12:56:00 -07:00
parent 0bccc67d96
commit a7e488e71a
No known key found for this signature in database
GPG key ID: 76CF846A2F674B2C

View file

@ -37,6 +37,14 @@ class Go < Formula
sha256 "51d905e0b43b3d0ed41aaf23e19001ab4bc3f96c3ca134b48f7892485fc52961"
end
# Prevents Go from building malformed binaries. Fixed upstream, should
# be in a future release.
# https://github.com/golang/go/issues/32673
patch do
url "https://github.com/golang/go/commit/26954bde4443c4bfbfe7608f35584b6b810f3f2c.patch?full_index=1"
sha256 "25a361bd4aa1155be06e2239c1974aa9c59f971210f19e16a3b7b576b9d4f677"
end
def install
(buildpath/"gobootstrap").install resource("gobootstrap")
ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap"