diff options
| author | Misty De Meo | 2013-09-17 12:25:33 -0700 |
|---|---|---|
| committer | Misty De Meo | 2013-09-17 12:43:21 -0700 |
| commit | a9562366d26b92d5c54158665c109906e4e2caa3 (patch) | |
| tree | aa7d3447e7a5c8daab031105ae58f30e0537c673 /Library | |
| parent | 70489b72c36dbc88673e1ae3000a9b1edfb71fb0 (diff) | |
| download | homebrew-a9562366d26b92d5c54158665c109906e4e2caa3.tar.bz2 | |
go: upstream patch for clang when cross-compiling
More properly fixes #22610.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/go.rb | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/Library/Formula/go.rb b/Library/Formula/go.rb index 66a9bd737..017d5831d 100644 --- a/Library/Formula/go.rb +++ b/Library/Formula/go.rb @@ -21,13 +21,13 @@ class Go < Formula fails_with :clang do cause "clang: error: no such file or directory: 'libgcc.a'" end - elsif build.include?('cross-compile-all') || build.include?('cross-compile-common') - fails_with :clang do - cause "error: no case matching constant switch condition '53' [-Werror] - switch(thechar){" - end end + # Upstream patch for a switch statement that causes a clang error + # Should be in the next release. + # http://code.google.com/p/go/source/detail?r=000ecca1178d67c9b482d3fb0b6a1bc4aeef2472&path=/src/cmd/ld/lib.c + def patches; DATA; end + def install # install the completion scripts bash_completion.install 'misc/bash/go' => 'go-completion.bash' @@ -119,3 +119,33 @@ class Go < Formula assert_equal "Hello World\n", `#{bin}/go run hello.go` end end + +__END__ +# HG changeset patch +# User Dave Cheney <dave@cheney.net> +# Date 1373336072 18000 +# Mon Jul 08 21:14:32 2013 -0500 +# Node ID 000ecca1178d67c9b482d3fb0b6a1bc4aeef2472 +# Parent 02b673333fab068d9e12106c01748c2d23682bac +cmd/ld: trivial: fix unhandled switch case + +Fix warning found by clang 3.3. + +R=rsc, r +CC=golang-dev +https://codereview.appspot.com/11022043 + +diff -r 02b673333fab -r 000ecca1178d src/cmd/ld/lib.c +--- a/src/cmd/ld/lib.c Tue Jul 09 11:12:05 2013 +1000 ++++ b/src/cmd/ld/lib.c Mon Jul 08 21:14:32 2013 -0500 +@@ -665,6 +665,9 @@ + case '6': + argv[argc++] = "-m64"; + break; ++ case '5': ++ // nothing required for arm ++ break; + } + if(!debug['s'] && !debug_s) { + argv[argc++] = "-gdwarf-2"; + |
