diff mbox

Add target-independent specs options to .opt files

Message ID Pine.LNX.4.64.1012030122340.31301@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers Dec. 3, 2010, 1:24 a.m. UTC
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  <joseph@codesourcery.com>

	* 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  <joseph@codesourcery.com>

	* gcc-interface/lang.opt (k8): New option.

java:
2010-12-02  Joseph Myers  <joseph@codesourcery.com>

	* lang.opt (static-libgcj): New option.

Comments

Richard Biener Dec. 3, 2010, 11:33 a.m. UTC | #1
On Fri, Dec 3, 2010 at 2:24 AM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> 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?

Ok.

Thanks,
Richard.

> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
>
>        * 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  <joseph@codesourcery.com>
>
>        * gcc-interface/lang.opt (k8): New option.
>
> java:
> 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
>
>        * 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<number>     Set optimization level to <number>
> @@ -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 <file>       Emit declaration information into <file>
> @@ -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)
>
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>
diff mbox

Patch

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<number>	Set optimization level to <number>
@@ -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 <file>	Emit declaration information into <file>
@@ -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)