Message ID | mcrvcr2l8a3.fsf@dhcp-172-18-216-180.mtv.corp.google.com |
---|---|
State | New |
Headers | show |
On 11/02/2011 10:54 AM, Ian Lance Taylor wrote: > Rainer Orth<ro@CeBiTec.Uni-Bielefeld.DE> writes: > >> All go and libgo execution tests are failing for me with this patch on >> x86_64-unknown-linux-gnu (CentOS 5.5, I think): >> >> output is: >> /var/gcc/regression/trunk/2.6.18-gcc-gas-gld/build/x86_64-unknown-linux-gnu/./li >> bgo/.libs/libgo.so: undefined reference to `inotify_init1' >> /var/gcc/regression/trunk/2.6.18-gcc-gas-gld/build/x86_64-unknown-linux-gnu/./li >> bgo/.libs/libgo.so: undefined reference to `fallocate' >> /var/gcc/regression/trunk/2.6.18-gcc-gas-gld/build/x86_64-unknown-linux-gnu/./li >> bgo/.libs/libgo.so: undefined reference to `sync_file_range' >> collect2: error: ld returned 1 exit status >> >> FAIL: go.go-torture/execute/array-1.go compilation, -O0 > > I assume that CentOS 5.5 uses some version of glibc before version 2.6. > The three functions you mention are not supported in older versions of > glibc. Fortunately, they are not called anywhere else in the library, > so this patch takes the easy way out and simply removes them. > Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. > Committed to mainline. On Linux you also have iopl and ioperm which are x86 only. On MIPS we fail because of those. I was going to create a patch to move those two to libcall_linux_{386,amd64}.go. An alternative would be to remove them too. David Daney
Ian Lance Taylor <iant@google.com> writes: > I assume that CentOS 5.5 uses some version of glibc before version 2.6. Right: $ /lib/libc.so.6 GNU C Library stable release version 2.5, by Roland McGrath et al. > The three functions you mention are not supported in older versions of > glibc. Fortunately, they are not called anywhere else in the library, > so this patch takes the easy way out and simply removes them. > Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. > Committed to mainline. Fine, thanks. Rainer
David Daney <david.daney@cavium.com> writes: > On MIPS we fail because of those. I was going to create a patch to > move those two to libcall_linux_{386,amd64}.go. An alternative would > be to remove them too. Moving them sounds good to me. libgo already has a framework for architecture specific system calls. It doesn't have a framework for glibc version. Ian
On Wed, 2 Nov 2011, Ian Lance Taylor wrote: > David Daney <david.daney@cavium.com> writes: > > > On MIPS we fail because of those. I was going to create a patch to > > move those two to libcall_linux_{386,amd64}.go. An alternative would > > be to remove them too. > > Moving them sounds good to me. libgo already has a framework for > architecture specific system calls. It doesn't have a framework for > glibc version. autoconf detection of available functions (for functions that aren't always available for a given target) would be better than basing things on glibc version, anyway - and in libgo, just as in libstdc++, you can safely assume target libc is available for running link tests. autoconf detection will probably be required if anyone wants to build libgo with uClibc, for example.
On Wed, 2 Nov 2011, David Daney wrote:
> On Linux you also have iopl and ioperm which are x86 only.
ARM and Alpha appear to have them as well, though I don't know if anyone
actually uses them on those targets.
diff -r c0c039af2298 libgo/go/syscall/libcall_linux.go --- a/libgo/go/syscall/libcall_linux.go Wed Nov 02 09:48:33 2011 -0700 +++ b/libgo/go/syscall/libcall_linux.go Wed Nov 02 10:32:33 2011 -0700 @@ -186,8 +186,9 @@ //sys Faccessat(dirfd int, path string, mode uint32, flags int) (errno int) //faccessat(dirfd int, pathname *byte, mode int, flags int) int -//sys Fallocate(fd int, mode uint32, off int64, len int64) (errno int) -//fallocate(fd int, mode int, offset Offset_t, len Offset_t) int +// FIXME: Only in glibc 2.10 and later. +// //sys Fallocate(fd int, mode uint32, off int64, len int64) (errno int) +// //fallocate(fd int, mode int, offset Offset_t, len Offset_t) int //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (errno int) //fchmodat(dirfd int, pathname *byte, mode Mode_t, flags int) int @@ -223,8 +224,9 @@ //sysnb InotifyInit() (fd int, errno int) //inotify_init() int -//sysnb InotifyInit1(flags int) (fd int, errno int) -//inotify_init1(flags int) int +// FIXME: Only in glibc 2.9 and later. +// //sysnb InotifyInit1(flags int) (fd int, errno int) +// //inotify_init1(flags int) int //sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, errno int) //inotify_rm_watch(fd int, wd uint32) int @@ -298,8 +300,9 @@ // //sys Statfs(path string, buf *Statfs_t) (errno int) // //statfs(path *byte, buf *Statfs_t) int -//sys SyncFileRange(fd int, off int64, n int64, flags int) (errno int) -//sync_file_range(fd int, off Offset_t, n Offset_t, flags uint) int +// FIXME: Only in glibc 2.6 and later. +// //sys SyncFileRange(fd int, off int64, n int64, flags int) (errno int) +// //sync_file_range(fd int, off Offset_t, n Offset_t, flags uint) int // FIXME: mksysinfo Sysinfo_t // //sysnb Sysinfo(info *Sysinfo_t) (errno int)