From 7803dd611d3cc16013a7c0ca3767bec4da22e348 Mon Sep 17 00:00:00 2001 From: Joe Shaw Date: Mon, 11 Feb 2013 13:06:22 -0500 Subject: [PATCH] go: host platform must always be the last one built Each cross-compiler step also rebuilds the host platform. If ENABLE_CGO=0 in a later build step, important OS routines (like looking up x509 certificates in the keychain) are not implemented even for the host platform. Closes Homebrew/homebrew#17758. Signed-off-by: Adam Vandenberg --- Formula/go.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Formula/go.rb b/Formula/go.rb index 3390fa9133..9a9b0052b9 100644 --- a/Formula/go.rb +++ b/Formula/go.rb @@ -20,19 +20,23 @@ class Go < Formula if build.include? 'cross-compile-all' targets = [ - ['darwin', ['386', 'amd64'], { :cgo => true }], ['linux', ['386', 'amd64', 'arm'], { :cgo => false }], ['freebsd', ['386', 'amd64'], { :cgo => false }], ['openbsd', ['386', 'amd64'], { :cgo => false }], ['windows', ['386', 'amd64'], { :cgo => false }], + + # Host platform (darwin/amd64) must always come last + ['darwin', ['386', 'amd64'], { :cgo => true }], ] elsif build.include? 'cross-compile-common' targets = [ - ['darwin', ['386', 'amd64'], { :cgo => true }], ['linux', ['386', 'amd64', 'arm'], { :cgo => false }], ['windows', ['386', 'amd64'], { :cgo => false }], + + # Host platform (darwin/amd64) must always come last + ['darwin', ['386', 'amd64'], { :cgo => true }], ] else targets = [