Building Go for MIPS 32, problem with NaN settings

I’m trying to build a Go cross compiler (using buildroot) for a MIPS32 processor. The processor is a mips32r5, the Go version distributed with Buildroot is 1.19 (using Go 1.4 for bootstrap).

I understand that MIPS 32 is supported by Go. Unfortunately, not all floating point setups seem to be supported, and the build process ends like this:

The error seems to be because the toolchain (which was provided by board vendor) uses IEEE754 2008 Nan encoding, while Go defaults to using the “legacy” enconding because it targets only mips32 and no other later revisions.

As indicated in the error message, mips32 only supports “legacy”, but mips32r5 can potentially support both 2008 and Legacy.

Rebuilding all of the system (and the toolchain) in legacy mode allows to get through this point, but the particular cpu variant in this board does not support “legacy” mode, only 2008, so I need to depend on FPU emulation to make it work.

Changing “mips32” for “mips32r5” here in this line of the Go code also allows getting past this error, but a while later the build process tries to link again a module built for Legacy with another for 2008 and the process terminates with an error.

Has anyone seen this kind of problem before? can the build process be retargetted for mips32r5 instead of a bare mips?


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.