From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26060 invoked by alias); 5 Apr 2011 11:22:35 -0000 Received: (qmail 26048 invoked by uid 22791); 5 Apr 2011 11:22:33 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_XG,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; Tue, 05 Apr 2011 11:21:59 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p35BLrtM006229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Apr 2011 07:21:53 -0400 Received: from [10.36.11.62] (vpn2-11-62.ams2.redhat.com [10.36.11.62]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p35BLpj4019259; Tue, 5 Apr 2011 07:21:52 -0400 Message-ID: <4D9AFB75.4000208@redhat.com> Date: Tue, 05 Apr 2011 11:22:00 -0000 From: Nick Clifton User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: "Joseph S. Myers" CC: gcc-patches@gcc.gnu.org Subject: Re: Avoid global state in rx_handle_option References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00313.txt.bz2 Hi Joseph, > Tested building cc1 and xgcc for cross to rx-elf. Will commit to > trunk in the absence of target maintainer objections. > > 2011-04-04 Joseph Myers > > * config/rx/rx-opts.h: New. > * config/rx/rx.c (rx_cpu_type): Remove. > (rx_handle_option): Don't assert that global structures are in > use. Access variables via opts pointer. Defer most handling of > OPT_mint_register_. Use error_at. > (rx_option_override): Handle deferred OPT_mint_register_ here. > * config/rx/rx.h (enum rx_cpu_types): Move to rx-opts.h. > * config/rx/rx.opt (config/rx/rx-opts.h: New HeaderInclude. > (mcpu=): Use Enum and specifiy rx_cpu_type with Var. > (rx_cpu_types): New Enum and EnumValue entries. > (mint-register=): Use Defer and use Var accordingly. No objections - please apply. Cheers Nick