From patchwork Thu Mar 14 16:53:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 227747 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 496092C00D0 for ; Fri, 15 Mar 2013 03:54:54 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1363884896; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=4PzESoNvXygFSkcTJ/6VY62WhBM=; b=hr/9epEGYK0r+mb xVfR8SSIVCpNATejqLXMfMD4guwxuufWxcCwQbr+uprFtjeKIIxXgV/nPp6RAcja DVq9l60Qv1rZg+c0iYaQRgPhKdlX/Mqa1ojOwMdPROWxflB189VVqNF2Bfn4JWzI 8TNkNh2BKPLCT1EfJ1NOgZAxZZvA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=kyDXRvS/xKBXnxTxzMFpscqyUGBNgM2Dne2LKejAY0ODivhenLS0WQDenIFKQR JO6LMEed2kEoITaP4yoEDQij+0hYN+vE/xs/bPmlWYxV5SQBZ44bjvMEHXvSlgYe fnjW0yTogSWXzeXCf06EcUPzhY3jYMNs1SGMr19Ao/S/A=; Received: (qmail 9971 invoked by alias); 14 Mar 2013 16:54:44 -0000 Received: (qmail 9962 invoked by uid 22791); 14 Mar 2013 16:54:43 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Mar 2013 16:54:03 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id CC120C38; Thu, 14 Mar 2013 17:54:00 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NfDgOY2V3NCU; Thu, 14 Mar 2013 17:53:56 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 07C83C37; Thu, 14 Mar 2013 17:53:56 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id r2EGrtG7004023; Thu, 14 Mar 2013 17:53:55 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Ian Lance Taylor Subject: [4.7, go] Backport godump.c patch Date: Thu, 14 Mar 2013 17:53:55 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (usg-unix-v) 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 Since Solaris 11.1, libgo compilation was failing with sysinfo.go:676:267: error: use of undefined type '_ns_postinit_s' sysinfo.go had type _netstack struct { netstack_u struct { nu_modules [20+1]*byte; }; netstack_m_state [20+1]uint32; netstack_lock _kmutex_t; netstack_next *_netstack; netstack_stackid int32; netstack_numzones int32; netstack_refcnt int32; netstack_flags int32; netstack_postinit *_ns_postinit_s; } const _sizeof_netstack = 200 type _netstack_t struct { netstack_u struct { nu_modules [20+1]*byte; }; netstack_m_state [20+1]uint32; netstack_lock _kmutex_t; netstack_next *_netstack; netstack_stackid int32; netstack_numzones int32; netstack_refcnt int32; netstack_flags int32; netstack_postinit *_ns_postinit_s; } but no definition of _ns_postinit_s. For a long time, I had a local patch in my tree to just omit the related _netstack, _netstack_t, and _netstack_registry types in mksysinfo.sh to avoid this. When I tried without this patch on mainline, I noticed that the build worked just fine, while on the 4.7 branch it still fails. I found that this patch 2012-12-04 Ian Lance Taylor * godump.c (find_dummy_types): Output a dummy type if we couldn't output the real type. fixes the problem, so I'd like to backport it. i386-pc-solaris2.11 bootstrap still running, ok for 4.7 branch if it passes? One additional question: the patch updates the copyright date by adding 2012. How do we hande this for a backport? Keep it that way or update for 2013 instead? Thanks. Rainer diff --git a/gcc/godump.c b/gcc/godump.c --- a/gcc/godump.c +++ b/gcc/godump.c @@ -1,5 +1,5 @@ /* Output Go language descriptions of types. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GCC. @@ -1164,9 +1164,11 @@ find_dummy_types (const void *ptr, void struct godump_container *data = (struct godump_container *) adata; const char *type = (const char *) ptr; void **slot; + void **islot; slot = htab_find_slot (data->type_hash, type, NO_INSERT); - if (slot == NULL) + islot = htab_find_slot (data->invalid_hash, type, NO_INSERT); + if (slot == NULL || islot != NULL) fprintf (go_dump_file, "type _%s struct {}\n", type); return true; }