]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix bytes and net the right way
authorRuss Cox <rsc@golang.org>
Wed, 24 Sep 2014 23:18:01 +0000 (19:18 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 24 Sep 2014 23:18:01 +0000 (19:18 -0400)
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

src/bytes/bytes.s [deleted file]
src/cmd/go/build.go
src/net/empty.s [deleted file]

diff --git a/src/bytes/bytes.s b/src/bytes/bytes.s
deleted file mode 100644 (file)
index 55103ba..0000000
+++ /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.
index 27bd307378c33bfe97e65b23dfc84de0a6d982cb..fcc6b699bed7fb16cca832198a5de37b0981d824 100644 (file)
@@ -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 (file)
index f0b255a..0000000
+++ /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