"H.J. Lu" <hjl.to...@gmail.com> writes: > On Sat, Sep 29, 2018 at 9:01 PM Ian Lance Taylor <i...@airs.com> wrote: >> >> "H.J. Lu" <hjl.to...@gmail.com> writes: >> >> > On x86-64, sys.GoarchAmd64 == 1 for -mx32. But -mx32 has 32-bit >> > pointer, not 64-bit. There is >> > >> > // _64bit = 1 on 64-bit systems, 0 on 32-bit systems >> > _64bit = 1 << (^uintptr(0) >> 63) / 2 >> > >> > We should check both _64bit and sys.GoarchAmd64. >> >> Thanks, but I think the correct fix is to set GOARCH to amd64p32 when >> using x32. I'm trying that to see if it will work out. >> > > My understanding is amd64p32 == NaCl. But x32 != NaCl.
For Go, GOARCH=amd64p32 GOOS=nacl is NaCl. But logically amd64p32 means amd64 with 32-bit pointers, so it may be possible to repurpose GOARCH=amd64p32 GOOS=linux for x32. Ian