On Wed, Sep 26, 2018 at 7:50 AM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Mon, Sep 24, 2018 at 2:46 PM, Ian Lance Taylor <i...@golang.org> wrote: >> I've committed a patch to update libgo to the 1.11 release. As usual >> for these updates, the patch is too large to attach to this e-mail >> message. I've attached some of the more relevant directories. This >> update required some minor patches to the gotools directory and the Go >> testsuite, also included here. Bootstrapped and ran Go testsuite on >> x86_64-pc-linux-gnu. Committed to mainline. >> >> Ian >> >> 2018-09-24 Ian Lance Taylor <i...@golang.org> >> >> * Makefile.am (mostlyclean-local): Run chmod on check-go-dir to >> make sure it is writable. >> (check-go-tools): Likewise. >> (check-vet): Copy internal/objabi to check-vet-dir. >> * Makefile.in: Rebuild. > > When building with -mx32, I got > > /export/gnu/import/git/sources/gcc/libgo/go/runtime/malloc.go:309:44: > error: integer constant overflow > 309 | arenaBaseOffset uintptr = sys.GoarchAmd64 * (1 << 47) > | ^ >
This seems to work: diff --git a/libgo/go/runtime/malloc.go b/libgo/go/runtime/malloc.go index ac4759ffbf1..c3445387057 100644 --- a/libgo/go/runtime/malloc.go +++ b/libgo/go/runtime/malloc.go @@ -306,7 +306,7 @@ const ( // // On other platforms, the user address space is contiguous // and starts at 0, so no offset is necessary. - arenaBaseOffset uintptr = sys.GoarchAmd64 * (1 << 47) + arenaBaseOffset uintptr = _64bit * sys.GoarchAmd64 * (1 << 47) // Max number of threads to run garbage collection. // 2, 3, and 4 are all plausible maximums depending -- H.J.