From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71137 invoked by alias); 11 Aug 2016 21:36:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 71121 invoked by uid 89); 11 Aug 2016 21:36:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_50,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=Writing, Neither, rocebitecunibielefeldde, ro@cebitec.uni-bielefeld.de X-HELO: mail-io0-f178.google.com Received: from mail-io0-f178.google.com (HELO mail-io0-f178.google.com) (209.85.223.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Aug 2016 21:36:19 +0000 Received: by mail-io0-f178.google.com with SMTP id m101so8534612ioi.2 for ; Thu, 11 Aug 2016 14:36:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IGlzJfM98dwzJFv6aRIweTFrzg5gzyZBeZJHlVs51Gw=; b=KUpayHIdHQlULMjK5WOYnCXQJYUXYmeZvPxcQsDFhyZ6I7vP2l0EyylRi8HnD7V+b9 AN2GA+VsYLms2ZI7yRYZvAeqCwAQqQir+U77mv07ryhg1D+MHCf2lPsd5vj1yzSwsQ4C gIHPcnauW+PsuLw2I+q8Sbrhakw59x5u8E1OqTOUZuhzYJnKHJ3v0nRyMhRpZO2RSv7V pcO6Bg5/HVD5HuKaO9m7CUdZzzhtVe7hdZEO5kI9wVwXla/qmAWGVJmw19+wE9W+f38Z 3BZj+VWLp9NziwSQUXuHMHIGKGyFmuQMQ6WbXbe1iAgC1y3hLAzJe+HuUG0f5CXEVSH/ 3Qwg== X-Gm-Message-State: AEkoouum1+3IgZ9naCrlf9lot8pZYvLZpnnKqcyCXS3MTqYeUt+q7XMnjJm1bgOjg7eWO7pk5bYJOm+mJnTqow== X-Received: by 10.107.11.39 with SMTP id v39mr15845873ioi.107.1470951378039; Thu, 11 Aug 2016 14:36:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.35.199 with HTTP; Thu, 11 Aug 2016 14:36:17 -0700 (PDT) In-Reply-To: References: From: Ian Lance Taylor Date: Thu, 11 Aug 2016 21:36:00 -0000 Message-ID: Subject: Re: libgo patch committed: Change build procedure to use build tags To: Rainer Orth Cc: gcc-patches , "gofrontend-dev@googlegroups.com" Content-Type: multipart/mixed; boundary=001a113f89645f04350539d28ee0 X-SW-Source: 2016-08/txt/msg00968.txt.bz2 --001a113f89645f04350539d28ee0 Content-Type: text/plain; charset=UTF-8 Content-length: 2453 On Thu, Aug 11, 2016 at 8:15 AM, Rainer Orth wrote: > >> Go packages use build tags (see the section on Build Constraints at >> https://golang.org/pkg/go/build/) to select which files to build on >> specific systems. >> >> Previously the libgo Makefile explicitly listed the set of files to >> compile for each package. For packages that use build tags, this >> required a lot of awkward automake conditionals in the Makefile. >> >> This patch changes the build to look at the build tags in the files. >> The new shell script libgo/match.sh does the matching. This required >> adjusting a lot of build tags, and removing some files that are never >> used. I verified that the exact same sets of files are compiled on >> x86_64-pc-linux-gnu. I also tested the build on i386-sun-solaris >> (building for both 32-bit and 64-bit). >> >> Writing match.sh revealed some bugs in the build tag handling that >> already exists, in a slightly different form, in the gotest shell >> script. This patch fixes those problems as well. >> >> The old code used automake conditionals to handle systems that were >> missing strerror_r and wait4. Rather than deal with those in Go, >> those functions are now implemented in runtime/go-nosys.c when >> necessary, so the Go code can simply assume that they exist. >> >> The os testsuite looked for dir_unix.go, which was never built for >> gccgo and has now been removed. I changed the testsuite to look for >> dir.go instead. >> >> Note that if you have an existing build directory, you will have to >> remove all the .dep files in TARGET/libgo after updating to this >> patch. There isn't anything that will force them to update >> automatically. >> >> Bootstrapped on x86_64-pc-linux-gnu and i386-sun-solaris. Ran Go >> testsuite on x86_64-pc-linux-gnu. Committed to mainline. > > this patch broke i386-pc-solaris2.12 and sparc-sun-solaris2.12 > bootstrap, however: in both cases, the 64-bit build of os.lo fails like this: > > /vol/gcc/src/hg/trunk/local/libgo/go/os/dir.go:82:8: error: reference to undefined name 'libc_readdir_r' > i := libc_readdir_r(file.dirinfo.dir, entryDirent, pr) > ^ > > Neither dir_largefile.go (which is correctly omitted, being 32-bit only) > nor dir_regfile.go (which is needed here) is included in the > compilation. Sorry, I don't know what I messed up in my testing. I committed the appended patch, which should fix the problem. Ian --001a113f89645f04350539d28ee0 Content-Type: text/plain; charset=US-ASCII; name="patch.txt" Content-Disposition: attachment; filename="patch.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_irqughah0 Content-length: 1094 SW5kZXg6IGdjYy9nby9nb2Zyb250ZW5kL01FUkdFCj09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT0KLS0tIGdjYy9nby9nb2Zyb250ZW5kL01FUkdFCShyZXZpc2lv biAyMzkzMzIpCisrKyBnY2MvZ28vZ29mcm9udGVuZC9NRVJHRQkod29ya2lu ZyBjb3B5KQpAQCAtMSw0ICsxLDQgQEAKLTVlMDViN2JjOTQ3MjMxYjRkNWE4 MzI3YmY2M2UyZmE2NDhlNTFkYzcKK2ZlMWU3N2Y4NDMyMjA1MDNmMWY4ZDVl YTdkZDVlMzA3NTgwZTFkMzgKIAogVGhlIGZpcnN0IGxpbmUgb2YgdGhpcyBm aWxlIGhvbGRzIHRoZSBnaXQgcmV2aXNpb24gbnVtYmVyIG9mIHRoZSBsYXN0 CiBtZXJnZSBkb25lIGZyb20gdGhlIGdvZnJvbnRlbmQgcmVwb3NpdG9yeS4K SW5kZXg6IGxpYmdvL2dvL29zL2Rpcl9yZWdmaWxlLmdvCj09PT09PT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