1
0
mirror of https://github.com/golang/go synced 2024-11-23 11:10:04 -07:00

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
This commit is contained in:
Russ Cox 2014-09-24 19:18:01 -04:00
parent d2b84dd941
commit 6077f0fc32
3 changed files with 1 additions and 16 deletions

View File

@ -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.

View 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++
}
}

View File

@ -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