From: Russ Cox Date: Wed, 24 Sep 2014 23:18:01 +0000 (-0400) Subject: cmd/go: fix bytes and net the right way X-Git-Tag: go1.4beta1~301 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6077f0fc32a401f9a7b9540b6d1b00e855018c9a;p=gostls13.git cmd/go: fix bytes and net the right way Not sure why they used empty.s and all these other packages were special cased in cmd/go instead. Add them to the list. This avoids problems with net .s files being compiled with gcc in cgo mode and gcc not supporting // comments on ARM. Not a problem with bytes, but be consistent. The last change fixed the ARM build but broke the Windows build. Maybe *this* will make everyone happy. Sigh. TBR=iant CC=golang-codereviews https://golang.org/cl/144530046 --- diff --git a/src/bytes/bytes.s b/src/bytes/bytes.s deleted file mode 100644 index 55103bae05..0000000000 --- a/src/bytes/bytes.s +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file is here just to make the go tool happy. diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go index 27bd307378..fcc6b699be 100644 --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -1630,7 +1630,7 @@ func (gcToolchain) gc(b *builder, p *Package, archive, obj string, importArgs [] extFiles := len(p.CgoFiles) + len(p.CFiles) + len(p.CXXFiles) + len(p.MFiles) + len(p.SFiles) + len(p.SysoFiles) + len(p.SwigFiles) + len(p.SwigCXXFiles) if p.Standard { switch p.ImportPath { - case "os", "runtime/pprof", "sync", "time": + case "bytes", "net", "os", "runtime/pprof", "sync", "time": extFiles++ } } diff --git a/src/net/empty.s b/src/net/empty.s deleted file mode 100644 index f0b255a0cf..0000000000 --- a/src/net/empty.s +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !cgo - -// This file is required to prevent compiler errors -// when the package built with CGO_ENABLED=0. -// Otherwise the compiler says: -// pkg/net/fd_poll_runtime.go:15: missing function body