From patchwork Fri Jun 11 07:37:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 55295 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 5ACF61007D4 for ; Fri, 11 Jun 2010 17:37:30 +1000 (EST) Received: (qmail 31819 invoked by alias); 11 Jun 2010 07:37:27 -0000 Received: (qmail 31795 invoked by uid 22791); 11 Jun 2010 07:37:25 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Jun 2010 07:37:21 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5B7bI8r017675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Jun 2010 03:37:18 -0400 Received: from adjoa.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5B7bGtN028191; Fri, 11 Jun 2010 03:37:16 -0400 From: Dodji Seketeli To: Jason Merrill Cc: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: Re: [RFC] PR c++/44188 References: <20100520110538.GR29186@redhat.com> <4BF575DA.8030108@redhat.com> <20100521121623.GU29186@redhat.com> <4BF6A896.3060703@redhat.com> <4BFBED4E.6030306@redhat.com> <4BFC92CD.9030702@redhat.com> <4BFD3CFA.8080908@redhat.com> <4BFD6192.2020807@redhat.com> <871vcg2f6w.fsf@firetop.home> <87ocfizkt6.fsf@firetop.home> X-URL: http://www.seketeli.org/dodji Date: Fri, 11 Jun 2010 09:37:16 +0200 In-Reply-To: <87ocfizkt6.fsf@firetop.home> (Richard Sandiford's message of "Thu, 10 Jun 2010 21:36:53 +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 Richard Sandiford writes: > For future reference, mipsisa64-elf is cross only. You can't bootstrap > GCC on it. Building a cross compiler is exactly the right thing to > do. Ah, okay, I didn't know. Thanks. > > I'm surprised that it took a long time though. "make all-gcc" (to get > cc1plus) ought to complete very quickly, especially by normal bootstrap > standards. ;-) You also don't need access to an assembler or linker if > you're just doing "make all-gcc". Well, I wanted to at least go as far as building libstdc++, but I had errors I couldn't undertanda and gave up eventually. I agree building cc1plus was quick :) Out of curiousity, Do you have a reference of how to build the cross for mipsisa64-elf? >> If you can do a quick test, does the (untested) patch below fix the >> issue for you? > > It certainly does. Thanks a lot for the quick fix. No problem. I bootstrapped and regtested the full compiler with the patch below on x86_64-unknown-linux-gnu against trunk and did a shallow test of it on mipsisa64-elf. As Jason OK'ed the patch in another subthread, I am going to apply this to trunk shortly. Thanks. commit 4bd63480903620092f5bbfe563569d90ef05b747 Author: Dodji Seketeli Date: Thu Jun 10 19:24:49 2010 +0200 Fix MIPS bootstrap gcc/ChangeLog: Fix bootstap on mips * dwarf2out.c (is_naming_typedef_dec): Built-in TYPE_DECLs cannot be naming typedefs. gcc/testsuite/ChangeLog: Fix MIPS bootstrap * g++.dg/other/typedef4.C: New test. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6cbe8dc..e35a780 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -19891,6 +19891,7 @@ is_naming_typedef_decl (const_tree decl) if (decl == NULL_TREE || TREE_CODE (decl) != TYPE_DECL || !is_tagged_type (TREE_TYPE (decl)) + || DECL_IS_BUILTIN (decl) || is_redundant_typedef (decl) /* It looks like Ada produces TYPE_DECLs that are very similar to C++ naming typedefs but that have different diff --git a/gcc/testsuite/g++.dg/other/typedef4.C b/gcc/testsuite/g++.dg/other/typedef4.C new file mode 100644 index 0000000..b752f2c --- /dev/null +++ b/gcc/testsuite/g++.dg/other/typedef4.C @@ -0,0 +1,7 @@ +// { dg-options "-g" } +// { dg-do compile } + +// On some platforms like MIPS, __builtin_va_list is a +// RECORD_TYPE. Make sure we don't wrongly try to generate debug info +// for its TYPE_DECL and crash. +typedef __builtin_va_list foo;