From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10131 invoked by alias); 30 Jan 2015 22:34:21 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 10096 invoked by uid 89); 30 Jan 2015 22:34:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.98.5 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: relay1.mentorg.com Date: Thu, 01 Jan 2015 00:00:00 -0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: David Malcolm CC: , , Ramana Radhakrishnan Subject: Re: [PATCH 1/3] PR jit/64810: driver, arm, jit: configure-time default options In-Reply-To: <1422616184-38258-1-git-send-email-dmalcolm@redhat.com> Message-ID: References: <1422616184-38258-1-git-send-email-dmalcolm@redhat.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2015-q1/txt/msg00053.txt.bz2 On Fri, 30 Jan 2015, David Malcolm wrote: > gcc/ChangeLog: > PR jit/64810 > * Makefile.in (GCC_OBJS): Add gcc-main.o. > * gcc-main.c: New file, containing "main" taken from gcc.c. > * gcc.c (do_self_spec): Free decoded_options. > (class driver): Move declaration to gcc.h. > (main): Move declaration and implementation to new file > gcc-main.c. > (driver_get_configure_time_options): New function. > * gcc.h (class driver): Move this declaration here, from > gcc.c. > (driver_get_configure_time_options): New declaration. The driver changes are OK. Though in the JIT I suspect you might need to process DRIVER_SELF_SPECS as well - not everything handled through DRIVER_SELF_SPECS is a default cc1 would follow anyway, sometimes it may actually set things rather than merely make them visible to other specs. And indeed CC1_SPEC may also be needed. Some architectures use DRIVER_SELF_SPECS to handle -march=native, some use CC1_SPEC - so if you configure --with-arch=native (a perfectly legitimate way to configure GCC if you're building it for one particular system to use to build code that will run only there) then processing OPTION_DEFAULT_SPECS will cause -march=native to appear in the list of options, and the other two specs are needed to convert it into the underlying options understood by the back-end option handling. -- Joseph S. Myers joseph@codesourcery.com