net: introduce netgo build tag to build a pure Go net package.
Fixes #4078.

R=golang-dev, bradfitz, rsc, iant
CC=golang-dev
https://golang.org/cl/7100050
diff --git a/src/pkg/net/cgo_bsd.go b/src/pkg/net/cgo_bsd.go
index 3b38e3d..53f8c38 100644
--- a/src/pkg/net/cgo_bsd.go
+++ b/src/pkg/net/cgo_bsd.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build !netgo
 // +build darwin freebsd
 
 package net
diff --git a/src/pkg/net/cgo_linux.go b/src/pkg/net/cgo_linux.go
index f6cefa8..693aef0 100644
--- a/src/pkg/net/cgo_linux.go
+++ b/src/pkg/net/cgo_linux.go
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo,!netgo
+
 package net
 
 /*
diff --git a/src/pkg/net/cgo_netbsd.go b/src/pkg/net/cgo_netbsd.go
index aeaf8e5..09c5ad2 100644
--- a/src/pkg/net/cgo_netbsd.go
+++ b/src/pkg/net/cgo_netbsd.go
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo,!netgo
+
 package net
 
 /*
diff --git a/src/pkg/net/cgo_openbsd.go b/src/pkg/net/cgo_openbsd.go
index aeaf8e5..09c5ad2 100644
--- a/src/pkg/net/cgo_openbsd.go
+++ b/src/pkg/net/cgo_openbsd.go
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo,!netgo
+
 package net
 
 /*
diff --git a/src/pkg/net/cgo_stub.go b/src/pkg/net/cgo_stub.go
index 52e57d7..f533c14 100644
--- a/src/pkg/net/cgo_stub.go
+++ b/src/pkg/net/cgo_stub.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !cgo
+// +build !cgo netgo
 
 // Stub cgo routines for systems that do not use cgo to do network lookups.
 
diff --git a/src/pkg/net/cgo_unix.go b/src/pkg/net/cgo_unix.go
index 7476140..0c3c569 100644
--- a/src/pkg/net/cgo_unix.go
+++ b/src/pkg/net/cgo_unix.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build !netgo
 // +build darwin freebsd linux netbsd openbsd
 
 package net