RFA: Document new SPEC switches

Nick Clifton nickc@redhat.com
Tue Jan 23 11:29:00 GMT 2001


Hi Guys,

  A couple of options have been added to the SPEC string code
  recently, which have not been documented.  This patch adds the
  missing documentation.  It also replaces occurrences of a comma
  inside a @gccoptlist macro with \, in order to prevent complaints
  about their being too many arguments to the macro.

  May I apply this patch ?

Cheers
	Nick


2001-01-23  Nick Clifton  <nickc@redhat.com>

	* invoke.texi: Replace , with \, inside @gccoptlist macros.
	(Spec Files): Document %B and %j and %.	and %v3 and %M and
	%{S*&T} spec switches.

Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/invoke.texi,v
retrieving revision 1.269
diff -p -r1.269 invoke.texi
*** invoke.texi	2001/01/17 20:45:32	1.269
--- invoke.texi	2001/01/23 19:23:43
*************** in the following sections.
*** 267,278 ****
  -iprefix @var{file}  -iwithprefix @var{dir} @gol
  -iwithprefixbefore @var{dir}  -isystem @var{dir} -isystem-c++ @var{dir} @gol
  -M  -MM  -MF  -MG  -MP  -MQ  -MT  -nostdinc  -P  -remap @gol
! -trigraphs  -undef  -U@var{macro}  -Wp,@var{option}}
  
  @item Assembler Option
  @xref{Assembler Options,,Passing Options to the Assembler}.
  @gccoptlist{
! -Wa,@var{option}}
  
  @item Linker Options
  @xref{Link Options,,Options for Linking}.
--- 267,278 ----
  -iprefix @var{file}  -iwithprefix @var{dir} @gol
  -iwithprefixbefore @var{dir}  -isystem @var{dir} -isystem-c++ @var{dir} @gol
  -M  -MM  -MF  -MG  -MP  -MQ  -MT  -nostdinc  -P  -remap @gol
! -trigraphs  -undef  -U@var{macro}  -Wp\,@var{option}}
  
  @item Assembler Option
  @xref{Assembler Options,,Passing Options to the Assembler}.
  @gccoptlist{
! -Wa\,@var{option}}
  
  @item Linker Options
  @xref{Link Options,,Options for Linking}.
*************** in the following sections.
*** 280,286 ****
  @var{object-file-name}  -l@var{library} @gol
  -nostartfiles  -nodefaultlibs  -nostdlib @gol
  -s  -static  -static-libgcc  -shared  -shared-libgcc  -symbolic @gol
! -Wl,@var{option}  -Xlinker @var{option} @gol
  -u @var{symbol}}
  
  @item Directory Options
--- 280,286 ----
  @var{object-file-name}  -l@var{library} @gol
  -nostartfiles  -nodefaultlibs  -nostdlib @gol
  -s  -static  -static-libgcc  -shared  -shared-libgcc  -symbolic @gol
! -Wl\,@var{option}  -Xlinker @var{option} @gol
  -u @var{symbol}}
  
  @item Directory Options
*************** in the following sections.
*** 519,525 ****
  
  @emph{System V Options}
  @gccoptlist{
! -Qy  -Qn  -YP,@var{paths}  -Ym,@var{dir}}
  
  @emph{ARC Options}
  @gccoptlist{
--- 519,525 ----
  
  @emph{System V Options}
  @gccoptlist{
! -Qy  -Qn  -YP\,@var{paths}  -Ym\,@var{dir}}
  
  @emph{ARC Options}
  @gccoptlist{
*************** in the following sections.
*** 554,560 ****
  
  @emph{MCore Options}
  @gccoptlist{
! -mhardlit, -mno-hardlit -mdiv -mno-div -mrelax-immediates  @gol
  -mno-relax-immediates -mwide-bitfields -mno-wide-bitfields @gol
  -m4byte-functions -mno-4byte-functions -mcallgraph-data @gol
  -mno-callgraph-data -mslow-bytes -mno-slow-bytes -mno-lsim @gol
--- 554,560 ----
  
  @emph{MCore Options}
  @gccoptlist{
! -mhardlit -mno-hardlit -mdiv -mno-div -mrelax-immediates  @gol
  -mno-relax-immediates -mwide-bitfields -mno-wide-bitfields @gol
  -m4byte-functions -mno-4byte-functions -mcallgraph-data @gol
  -mno-callgraph-data -mslow-bytes -mno-slow-bytes -mno-lsim @gol
*************** Trigraph support is not popular, so many
*** 3535,3541 ****
  properly.  Portable code should not rely on trigraphs being either
  converted or ignored.
  
! @item -Wp,@var{option}
  Pass @var{option} as an option to the preprocessor.  If @var{option}
  contains commas, it is split into multiple options at the commas.
  @end table
--- 3535,3541 ----
  properly.  Portable code should not rely on trigraphs being either
  converted or ignored.
  
! @item -Wp\,@var{option}
  Pass @var{option} as an option to the preprocessor.  If @var{option}
  contains commas, it is split into multiple options at the commas.
  @end table
*************** contains commas, it is split into multip
*** 3547,3553 ****
  You can pass options to the assembler.
  
  @table @gcctabopt
! @item -Wa,@var{option}
  Pass @var{option} as an option to the assembler.  If @var{option}
  contains commas, it is split into multiple options at the commas.
  @end table
--- 3547,3553 ----
  You can pass options to the assembler.
  
  @table @gcctabopt
! @item -Wa\,@var{option}
  Pass @var{option} as an option to the assembler.  If @var{option}
  contains commas, it is split into multiple options at the commas.
  @end table
*************** For example, to pass @samp{-assert defin
*** 3712,3718 ****
  @samp{-Xlinker "-assert definitions"}, because this passes the entire
  string as a single argument, which is not what the linker expects.
  
! @item -Wl,@var{option}
  Pass @var{option} as an option to the linker.  If @var{option} contains
  commas, it is split into multiple options at the commas.
  
--- 3712,3718 ----
  @samp{-Xlinker "-assert definitions"}, because this passes the entire
  string as a single argument, which is not what the linker expects.
  
! @item -Wl\,@var{option}
  Pass @var{option} as an option to the linker.  If @var{option} contains
  commas, it is split into multiple options at the commas.
  
*************** Substitute the basename of the input fil
*** 3967,3972 ****
--- 3967,3976 ----
  This is the substring up to (and not including) the last period
  and not including the directory.
  
+ @item %B
+ This is the same as @samp{%b}, but include the file suffix (text after
+ the last period).
+ 
  @item %d
  Marks the argument containing or following the @samp{%d} as a
  temporary file name, so that that file will be deleted if GCC exits
*************** for each @samp{%g.s} and another for eac
*** 4000,4005 ****
--- 4004,4021 ----
  simply substituted with a file name chosen for the previous @samp{%u},
  without regard to any appended suffix.
  
+ @item %j@var{SUFFIX}
+ Substitutes the name of the HOST_BIT_BUCKET, if any, and if it is 
+ writable, and if save-temps is off; otherwise, substitute the name
+ of a temporary file, just like @samp{%u}.  This temporary file is not
+ meant for communication between processes, but rather as a junk
+ disposal mechanism.
+ 
+ @item %.@var{SUFFIX}
+ Substitutes @var{.SUFFIX} for the suffixes of a matched switch's args
+ when it is subsequently output with @samp{%*}. @var{SUFFIX} is
+ terminated by the next space or %.
+ 
  @item %w
  Marks the argument containing or following the @samp{%w} as the
  designated output file of this compilation.  This puts the argument
*************** Substitute the major version number of G
*** 4075,4080 ****
--- 4091,4100 ----
  Substitute the minor version number of GCC.
  (For version 2.9.5, this is 9.)
  
+ @item %v3
+ Substitute the patch level number of GCC.
+ (For version 2.9.5, this is 5.)
+ 
  @item %a
  Process the @code{asm} spec.  This is used to compute the
  switches to be passed to the assembler.
*************** Dump out a @samp{-L} option for each dir
*** 4094,4099 ****
--- 4114,4124 ----
  contain startup files.  If the target supports multilibs then the
  current multilib directory will be prepended to each of these paths. 
  
+ @item %M
+ Output the multilib directory with directory seperators replaced with
+ "_".  If multilib directories are not set, or the multilib directory is
+ "." then this option emits nothing.
+ 
  @item %L
  Process the @code{lib} spec.  This is a spec string for deciding which
  libraries should be included on the command line to the linker. 
*************** text, including the space.  Thus two arg
*** 4158,4163 ****
--- 4183,4194 ----
  Like %@{@code{S}*@}, but don't put a blank between a switch and its
  argument.  Thus %@{^o*@} would only generate one argument, not two.
  
+ @item %@{@code{S}*&@code{T}*@}
+ Like %@{@code{S}*@}, but preserve order of @code{S} and @code{T} options
+ (the order of @code{S} and @code{T} in the spec is not significant).
+ There can be any number of ampersand-separated variables; for each the
+ wild card is optional.  Useful for CPP as @samp{%@{D*&U*&A*@}}.
+ 
  @item %@{<@code{S}@}
  Remove all occurrences of @code{-S} from the command line.  Note - this
  command is position dependent.  @samp{%} commands in the spec string
*************** Identify the versions of each tool used 
*** 7269,7279 ****
  Refrain from adding @code{.ident} directives to the output file (this is
  the default).
  
! @item -YP,@var{dirs}
  Search the directories @var{dirs}, and no others, for libraries
  specified with @samp{-l}.
  
! @item -Ym,@var{dir}
  Look in the directory @var{dir} to find the M4 preprocessor.
  The assembler uses this option.
  @c This is supposed to go with a -Yd for predefined M4 macro files, but
--- 7300,7310 ----
  Refrain from adding @code{.ident} directives to the output file (this is
  the default).
  
! @item -YP\,@var{dirs}
  Search the directories @var{dirs}, and no others, for libraries
  specified with @samp{-l}.
  
! @item -Ym\,@var{dir}
  Look in the directory @var{dir} to find the M4 preprocessor.
  The assembler uses this option.
  @c This is supposed to go with a -Yd for predefined M4 macro files, but


More information about the Gcc-patches mailing list