Repository: go
Issue: cmd/go: Unable to build Go 1.16 on i386 with GO386=387 or GO386=softfloat
Labels: NeedsDecision,arch-386

Prior to Go 1.16, it was possible to build with `GO386=387` on an i386 host using Go 1.4 as a bootstrap. This now fails as follows:

```
dev@i386:~/src/go/src$ uname -a
Linux i386 5.4.0-60-generic #67-Ubuntu SMP Tue Jan 5 18:31:36 UTC 2021 i686 i686 i686 GNU/Linux

dev@i386:~/src/go/src$ git -C ~/src/go1.4 status
On branch release-branch.go1.4
Your branch is up to date with 'origin/release-branch.go1.4'.

dev@i386:~/src/go/src$ GOROOT_BOOTSTRAP=~/src/go1.4 GO386=387 ./make.bash
Building Go cmd/dist using /home/dev/src/go1.4. (go1.4-bootstrap-20170531 linux/386)
Building Go toolchain1 using /home/dev/src/go1.4.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
unsupported setting GO386=387. Consider using GO386=softfloat instead.

go tool dist: FAILED: /home/dev/src/go/pkg/tool/linux_386/compile -std -pack -o /tmp/go-tool-dist-002851757/internal/abi/_go_.a -p internal/abi -importcfg /tmp/go-tool-dist-002851757/internal/abi/importcfg /home/dev/src/go/src/internal/abi/abi.go /home/dev/src/go/src/internal/abi/abi_generic.go: exit status 1
go tool dist: open /tmp/go-tool-dist-002851757/internal/abi/_go_.a: no such file or directory
go tool dist: open /tmp/go-tool-dist-002851757/internal/cpu/_go_.a: no such file or directory
go tool dist: open /tmp/go-tool-dist-002851757/runtime/internal/sys/_go_.a: no such file or directory
go tool dist: open /tmp/go-tool-dist-002851757/runtime/internal/atomic/_go_.a: no such file or directory
unsupported setting GO386=387. Consider using GO386=softfloat instead.

go tool dist: FAILED: /home/dev/src/go/pkg/tool/linux_386/compile -std -pack -o /tmp/go-tool-dist-002851757/internal/cpu/_go_.a -p internal/cpu -importcfg /tmp/go-tool-dist-002851757/internal/cpu/importcfg -asmhdr /tmp/go-tool-dist-002851757/internal/cpu/go_asm.h -symabis /tmp/go-tool-dist-002851757/internal/cpu/symabis /home/dev/src/go/src/internal/cpu/cpu.go /home/dev/src/go/src/internal/cpu/cpu_386.go /home/dev/src/go/src/internal/cpu/cpu_x86.go: exit status 1
unsupported setting GO386=387. Consider using GO386=softfloat instead.

go tool dist: FAILED: /home/dev/src/go/pkg/tool/linux_386/compile -std -pack -o /tmp/go-tool-dist-002851757/runtime/internal/sys/_go_.a -p runtime/internal/sys -importcfg /tmp/go-tool-dist-002851757/runtime/internal/sys/importcfg -asmhdr /tmp/go-tool-dist-002851757/runtime/internal/sys/go_asm.h -symabis /tmp/go-tool-dist-002851757/runtime/internal/sys/symabis /home/dev/src/go/src/runtime/internal/sys/arch.go /home/dev/src/go/src/runtime/internal/sys/arch_386.go /home/dev/src/go/src/runtime/internal/sys/intrinsics_common.go /home/dev/src/go/src/runtime/internal/sys/intrinsics_stubs.go /home/dev/src/go/src/runtime/internal/sys/sys.go /home/dev/src/go/src/runtime/internal/sys/zgoarch_386.go /home/dev/src/go/src/runtime/internal/sys/zgoos_linux.go /home/dev/src/go/src/runtime/internal/sys/zversion.go: exit status 1
unsupported setting GO386=387. Consider using GO386=softfloat instead.

go tool dist: FAILED: /home/dev/src/go/pkg/tool/linux_386/compile -std -pack -o /tmp/go-tool-dist-002851757/runtime/internal/atomic/_go_.a -p runtime/internal/atomic -importcfg /tmp/go-tool-dist-002851757/runtime/internal/atomic/importcfg -asmhdr /tmp/go-tool-dist-002851757/runtime/internal/atomic/go_asm.h -symabis /tmp/go-tool-dist-002851757/runtime/internal/atomic/symabis /home/dev/src/go/src/runtime/internal/atomic/atomic_386.go /home/dev/src/go/src/runtime/internal/atomic/stubs.go /home/dev/src/go/src/runtime/internal/atomic/unaligned.go: exit status 1
```

However, this also fails with `GO386=softfloat` as the Go 1.4 compiler (8g) knows nothing about this:

```
dev@i386:~/src/go/src$ GOROOT_BOOTSTRAP=~/src/go1.4 GO386=softfloat ./make.bash
Building Go cmd/dist using /home/dev/src/go1.4. (go1.4-bootstrap-20170531 linux/386)
# _/home/dev/src/go/src/cmd/dist
/home/dev/src/go1.4/pkg/tool/linux_386/8g: unsupported setting GO386=softfloat
```

This can be worked around by using a binary bootstrap, however it is a breaking change to a previously working behaviour.