$OpenBSD: patch-src_cmd_go_pkg_go,v 1.1 2012/10/01 06:20:09 jsing Exp $
--- src/cmd/go/pkg.go.orig	Thu Jun 14 13:23:36 2012
+++ src/cmd/go/pkg.go	Sat Sep 22 01:39:59 2012
@@ -494,11 +494,15 @@ func isStale(p *Package, topRoot map[string]bool) bool
 	// the linker.  This heuristic will not work if the binaries are back-dated,
 	// as some binary distributions may do, but it does handle a very
 	// common case.  See issue 3036.
-	if olderThan(buildToolchain.compiler()) {
-		return true
-	}
-	if p.build.IsCommand() && olderThan(buildToolchain.linker()) {
-		return true
+	// Assume that code in $GOROOT is up to date, as it might not be
+	// writeable.  See issue 4106.
+	if p.Root != goroot {
+		if olderThan(buildToolchain.compiler()) {
+			return true
+		}
+		if p.build.IsCommand() && olderThan(buildToolchain.linker()) {
+			return true
+		}
 	}
 
 	// Have installed copy, probably built using current compilers,
