From patchwork Fri Dec 3 01:24:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 74081 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 A465EB70A9 for ; Fri, 3 Dec 2010 12:24:33 +1100 (EST) Received: (qmail 30446 invoked by alias); 3 Dec 2010 01:24:31 -0000 Received: (qmail 30434 invoked by uid 22791); 3 Dec 2010 01:24:29 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_GC, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Dec 2010 01:24:25 +0000 Received: (qmail 27565 invoked from network); 3 Dec 2010 01:24:23 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Dec 2010 01:24:23 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1POKNp-0001mv-V2 for gcc-patches@gcc.gnu.org; Fri, 03 Dec 2010 01:24:21 +0000 Date: Fri, 3 Dec 2010 01:24:21 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org Subject: Add target-independent specs options to .opt files Message-ID: MIME-Version: 1.0 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 This patch adds target-independent options that were previously known only in specs to .opt files. Most of these are linker options. In addition, there's the -Q option; -Qn (-fno-ident), -Qy (which appears to be intended as the opposite of -Qn so is made available as such target-independently); the Ada driver -k8 option; and the Java -static-libgcj option (handled only in the generated libgcj.spec). I'm not sure what the linker -Z option handled by gcc.c is for; GNU ld doesn't appear to have such an option. It's quite possible it should be target-specific, but right now the specs pass it to the linker on all targets. Bootstrapped with no regressions on x86_64-unknown-linux-gnu. OK to commit? 2010-12-02 Joseph Myers * common.opt (N, Q, Qn, Qy, Z, n, r, s, t): New options. * gcc.c (cc1_options): Add %{Qy:}. ada: 2010-12-02 Joseph Myers * gcc-interface/lang.opt (k8): New option. java: 2010-12-02 Joseph Myers * lang.opt (static-libgcj): New option. Index: gcc/java/lang.opt =================================================================== --- gcc/java/lang.opt (revision 167388) +++ gcc/java/lang.opt (working copy) @@ -283,6 +283,9 @@ Set the target VM version s-bc-abi Driver +static-libgcj +Driver + version Java RejectDriver Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (revision 167388) +++ gcc/gcc.c (working copy) @@ -750,7 +750,7 @@ static const char *cc1_options = %{!fcompare-debug-second:%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}}%{!c:%{!S:-auxbase %b}} \ %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\ %{v:-version} %{pg:-p} %{p} %{f*} %{undef}\ - %{Qn:-fno-ident} %{-help:--help}\ + %{Qn:-fno-ident} %{Qy:} %{-help:--help}\ %{-target-help:--target-help}\ %{-version:--version}\ %{-help=*:--help=%*}\ Index: gcc/ada/gcc-interface/lang.opt =================================================================== --- gcc/ada/gcc-interface/lang.opt (revision 167388) +++ gcc/ada/gcc-interface/lang.opt (working copy) @@ -83,6 +83,9 @@ Woverlength-strings Ada ; Documented for C +k8 +Driver + nostdinc Ada RejectNegative ; Don't look for source files Index: gcc/common.opt =================================================================== --- gcc/common.opt (revision 167388) +++ gcc/common.opt (working copy) @@ -415,6 +415,9 @@ Driver L Driver Joined Separate +N +Driver + O Common JoinedOrMissing Optimization -O Set optimization level to @@ -427,6 +430,15 @@ Ofast Common Optimization Optimize for speed disregarding exact standards compliance +Q +Driver + +Qn +Driver Negative(Qy) + +Qy +Driver Negative(Qn) + R Driver Joined Separate @@ -654,6 +666,9 @@ Driver Separate Xpreprocessor Driver Separate +Z +Driver + aux-info Common Separate Var(aux_info_file_name) -aux-info Emit declaration information into @@ -2144,6 +2159,9 @@ Common Joined Var(plugindir_string) Init l Driver Joined Separate +n +Driver + no-canonical-prefixes Driver @@ -2209,12 +2227,21 @@ quiet Common Var(quiet_flag) RejectDriver Do not display functions compiled or elapsed time +r +Driver + +s +Driver + save-temps Driver save-temps= Driver Joined +t +Driver + time Driver Var(report_times)