-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-branch.go1.11] cmd/go: add GOMIPS value to build id for mipsle
Strip a trailing "le" from the GOARCH value when calculating the GOxxx environment variable that affects it. Updates #27260 Fixes #27420 Change-Id: I081f30d5dc19281901551823f4f56be028b5f71a Reviewed-on: https://go-review.googlesource.com/131379 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit 61318d7) Reviewed-on: https://go-review.googlesource.com/138176 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
- Loading branch information
1 parent
05a0c7b
commit 7544ac6
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Set up fresh GOCACHE. | ||
env GOCACHE=$WORK/gocache | ||
mkdir $GOCACHE | ||
|
||
# Building for mipsle without setting GOMIPS will use floating point registers. | ||
env GOARCH=mipsle | ||
env GOOS=linux | ||
go build -gcflags=-S f.go | ||
stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+ | ||
|
||
# Clean cache | ||
go clean -cache | ||
|
||
# Building with GOMIPS=softfloat will not use floating point registers | ||
env GOMIPS=softfloat | ||
go build -gcflags=-S f.go | ||
! stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+ | ||
|
||
# Clean cache | ||
go clean -cache | ||
|
||
# Build without setting GOMIPS | ||
env GOMIPS= | ||
go build -gcflags=-S f.go | ||
stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+ | ||
|
||
# Building with GOMIPS should still not use floating point registers. | ||
env GOMIPS=softfloat | ||
go build -gcflags=-S f.go | ||
! stderr ADDD.F[0-9]+,.F[0-9]+,.F[0-9]+ | ||
|
||
-- f.go -- | ||
package f | ||
|
||
func F(x float64) float64 { | ||
return x + x | ||
} |