dashboard: add linux-386-softfloat builder

It's based on the linux-386-387 builder, but with GO386=softfloat
and Debian 9 (stretch) instead of Debian 8 (jessie).

Test it on a subset of golang.org/x repos (golang.org/x/crypto),
since that should provide sufficient test coverage.

For golang/go#41840.
For golang/go#41848.

Change-Id: Ida95fce198056a05c359ac5ab816c582bdd5930f
Reviewed-on: https://go-review.googlesource.com/c/build/+/260201
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
diff --git a/dashboard/builders.go b/dashboard/builders.go
index 0bcdfa1..1fad1a0 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -1467,6 +1467,20 @@
 		numTryTestHelpers: 3,
 	})
 	addBuilder(BuildConfig{
+		Name:  "linux-386-softfloat",
+		Notes: "GO386=softfloat",
+		buildsRepo: func(repo, branch, goBranch string) bool {
+			// GO386=softfloat is added in Go 1.16 (golang.org/issue/41848).
+			return atLeastGo1(goBranch, 16) && (repo == "go" || repo == "crypto")
+		},
+		KnownIssue: 41840,
+		GoDeps: []string{
+			"04b8a9fea57e37589d82410281f22ebde0027808", // CL 260017, "all: implement GO386=softfloat".
+		},
+		HostType: "host-linux-stretch",
+		env:      []string{"GOARCH=386", "GOHOSTARCH=386", "GO386=softfloat"},
+	})
+	addBuilder(BuildConfig{
 		Name:  "linux-386-387",
 		Notes: "GO386=387",
 		buildsRepo: func(repo, branch, goBranch string) bool {
diff --git a/dashboard/builders_test.go b/dashboard/builders_test.go
index d7ca629..97742f6 100644
--- a/dashboard/builders_test.go
+++ b/dashboard/builders_test.go
@@ -308,6 +308,9 @@
 		// Don't test all subrepos on all the builders.
 		{b("linux-amd64-ssacheck", "net"), none},
 		{b("linux-amd64-ssacheck@go1.15", "net"), none},
+		{b("linux-386-softfloat", "crypto"), onlyPost},
+		{b("linux-386-softfloat@go1.16", "crypto"), onlyPost},
+		{b("linux-386-softfloat@go1.15", "crypto"), none},
 		{b("linux-386-387", "crypto"), none},
 		{b("linux-386-387@go1.16", "crypto"), none},
 		{b("linux-386-387@go1.15", "crypto"), onlyPost},