Apparently arm64 GNU/Linux does not provide ustat, and the linker warns about it when using glibc. This patch to libgo avoids providing syscall.Ustat on arm64 GNU/Linux, since it will apparently never work.
Since I was touching Makefile.am I rebuilt with automake 1.11.6, the new GCC standard. Bootstrapped and tested on x86_64-unknown-linux-gnu, which admittedly proves little, but at least syscall.Ustat still works there. Committed to mainline. Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 227758) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -1d9d92ab09996d2f7795481d2876a21194502b89 +ae60deadd72b3b29df98cee61deed68f251f0122 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/Makefile.am =================================================================== --- libgo/Makefile.am (revision 227696) +++ libgo/Makefile.am (working copy) @@ -1742,6 +1742,17 @@ else syscall_lsf_file = endif +# GNU/Linux specific ustat support. +if LIBGO_IS_LINUX +if LIBGO_IS_ARM64 +syscall_ustat_file = +else +syscall_ustat_file = go/syscall/libcall_linux_ustat.go +endif +else +syscall_ustat_file = +endif + # GNU/Linux specific utimesnano support. if LIBGO_IS_LINUX syscall_utimesnano_file = go/syscall/libcall_linux_utimesnano.go @@ -1780,6 +1791,7 @@ go_base_syscall_files = \ $(syscall_uname_file) \ $(syscall_netlink_file) \ $(syscall_lsf_file) \ + $(syscall_ustat_file) \ $(syscall_utimesnano_file) \ $(GO_LIBCALL_OS_FILE) \ $(GO_LIBCALL_OS_ARCH_FILE) \ Index: libgo/go/syscall/libcall_linux.go =================================================================== --- libgo/go/syscall/libcall_linux.go (revision 227696) +++ libgo/go/syscall/libcall_linux.go (working copy) @@ -408,6 +408,3 @@ func Unlinkat(dirfd int, path string) (e //sys Unshare(flags int) (err error) //unshare(flags _C_int) _C_int - -//sys Ustat(dev int, ubuf *Ustat_t) (err error) -//ustat(dev _dev_t, ubuf *Ustat_t) _C_int Index: libgo/go/syscall/libcall_linux_ustat.go =================================================================== --- libgo/go/syscall/libcall_linux_ustat.go (revision 0) +++ libgo/go/syscall/libcall_linux_ustat.go (working copy) @@ -0,0 +1,11 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// GNU/Linux library ustat call. +// This is not supported on some kernels, such as arm64. + +package syscall + +//sys Ustat(dev int, ubuf *Ustat_t) (err error) +//ustat(dev _dev_t, ubuf *Ustat_t) _C_int