From patchwork Wed Nov 2 17:54:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 123307 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3652BB6F87 for ; Thu, 3 Nov 2011 04:55:00 +1100 (EST) Received: (qmail 23037 invoked by alias); 2 Nov 2011 17:54:56 -0000 Received: (qmail 23017 invoked by uid 22791); 2 Nov 2011 17:54:55 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Nov 2011 17:54:31 +0000 Received: by pzk6 with SMTP id 6so957457pzk.6 for ; Wed, 02 Nov 2011 10:54:31 -0700 (PDT) Received: by 10.68.14.97 with SMTP id o1mr6347600pbc.0.1320256471028; Wed, 02 Nov 2011 10:54:31 -0700 (PDT) Received: by 10.68.14.97 with SMTP id o1mr6347574pbc.0.1320256470862; Wed, 02 Nov 2011 10:54:30 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id km16sm6456851pbb.9.2011.11.02.10.54.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Nov 2011 10:54:30 -0700 (PDT) From: Ian Lance Taylor To: Rainer Orth Cc: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Re: Go patch committed: Update Go library References: Date: Wed, 02 Nov 2011 10:54:28 -0700 In-Reply-To: (Rainer Orth's message of "Wed, 02 Nov 2011 17:52:51 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Rainer Orth 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. Ian 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)