This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Missing documentation


On Jun  9, 2001, Mark Mitchell <mark@codesourcery.com> wrote:

>   Alexandre:

>      -print-multi-lib
>      -print-multi-directory
>      -aux-info

Documented as follows.

I didn't know about -aux-info, and ended up finding a bug in its
implementation.  -aux-info=foo.X would create =foo.X, not foo.X as one
would expect.  -aux-info foo.X worked correctly.  I went ahead and
fixed this inconsistency.  Ok for branch and mainline?  Tested on
i686-pc-linux-gnu.

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* doc/invoke.texi (C Dialect Options): Document -aux-info.
	(Debugging Options): Document -print-multi-directory and
	-print-multi-lib.

Index: gcc/doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/doc/invoke.texi,v
retrieving revision 1.5
diff -u -p -r1.5 invoke.texi
--- gcc/doc/invoke.texi 2001/06/09 13:32:45 1.5
+++ gcc/doc/invoke.texi 2001/06/09 22:23:35
@@ -157,7 +157,8 @@ in the following sections.
 @item C Language Options
 @xref{C Dialect Options,,Options Controlling C Dialect}.
 @gccoptlist{
--ansi  -std=@var{standard}  -fno-asm  -fno-builtin @gol
+-ansi  -std=@var{standard}  -aux-info @var{filename} @gol
+-fno-asm  -fno-builtin @gol
 -fhosted  -ffreestanding @gol
 -trigraphs  -traditional  -traditional-cpp @gol
 -fallow-single-precision  -fcond-mismatch @gol
@@ -243,6 +244,7 @@ in the following sections.
 -g  -g@var{level}  -gcoff  -gdwarf  -gdwarf-1  -gdwarf-1+  -gdwarf-2 @gol
 -ggdb  -gstabs  -gstabs+  -gxcoff  -gxcoff+ @gol
 -p  -pg  -print-file-name=@var{library}  -print-libgcc-file-name @gol
+-print-multi-directory  -print-multi-lib @gol
 -print-prog-name=@var{program}  -print-search-dirs  -Q @gol
 -save-temps  -time}
 
@@ -959,6 +961,12 @@ the @code{inline} keyword in ISO C99) ar
 @xref{Standards,,Language Standards Supported by GCC}, for details of
 these standard versions.
 
+@item -aux-info @var{filename}
+@opindex aux-info
+Output to the given filename declarations for all functions declared
+and/or defined in a translation unit, including those in header files.
+This option is silently ignored in any languages other than C.
+
 @item -fno-asm
 @opindex fno-asm
 Do not recognize @code{asm}, @code{inline} or @code{typeof} as a
@@ -3052,6 +3060,20 @@ would be used when linking---and don't d
 option, GCC does not compile or link anything; it just prints the
 file name.
 
+@item -print-multi-directory
+@opindex print-multi-directory
+Print the directory name corresponding to the multilib selected by any
+other switches present in the command line.  This directory is supposed
+to exist in @env{GCC_EXEC_PREFIX}.
+
+@item -print-multi-lib
+@opindex print-multi-lib
+Print the mapping from multilib directory names to compiler switches
+that enable them.  The directory name is separated from the switches by
+@samp{;}, and each switch starts with an @samp{@@} instead of the
+@samp{-}, without spaces between multiple switches.  This is supposed to
+ease shell-processing.
+
 @item -print-prog-name=@var{program}
 @opindex print-prog-name
 Like @samp{-print-file-name}, but searches for a program such as @samp{cpp}.
@@ -9549,7 +9571,7 @@ the existing @samp{.X} file because it i
 For example:
 
 @example
-gcc -Dfoo=bar file1.c -aux-info
+gcc -Dfoo=bar file1.c -aux-info file1.X
 protoize *.c
 @end example
 
Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* toplev.c (independent_decode_option): Require `=' between
	`-aux-info' and filename in the same argument.
	* gcc.c: Don't pass -aux-info=filename twice.

Index: gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.466
diff -u -p -r1.466 toplev.c
--- gcc/toplev.c 2001/06/08 19:52:06 1.466
+++ gcc/toplev.c 2001/06/09 22:23:22
@@ -3922,7 +3922,7 @@ display_help ()
 		debug_args[i].arg, _(debug_args[i].description));
     }
 
-  printf (_("  -aux-info <file>        Emit declaration info into <file>.X\n"));
+  printf (_("  -aux-info <file>        Emit declaration info into <file>\n"));
   printf (_("  -quiet                  Do not display functions compiled or elapsed time\n"));
   printf (_("  -version                Display the compiler's version\n"));
   printf (_("  -d[letters]             Enable dumps from specific passes of the compiler\n"));
@@ -4557,17 +4557,22 @@ independent_decode_option (argc, argv)
 	}
       else if (!strncmp (arg, "aux-info", 8))
 	{
-	  flag_gen_aux_info = 1;
 	  if (arg[8] == '\0')
 	    {
 	      if (argc == 1)
 		return 0;
 
 	      aux_info_file_name = argv[1];
+	      flag_gen_aux_info = 1;
 	      return 2;
 	    }
+	  else if (arg[8] == '=')
+	    {
+	      aux_info_file_name = arg + 9;
+	      flag_gen_aux_info = 1;
+	    }
 	  else
-	    aux_info_file_name = arg + 8;
+	    return 0;
 	}
       else
 	return 0;
Index: gcc/gcc.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcc.c,v
retrieving revision 1.232
diff -u -p -r1.232 gcc.c
--- gcc/gcc.c 2001/06/04 00:19:17 1.232
+++ gcc/gcc.c 2001/06/09 22:23:22
@@ -663,7 +663,7 @@ static const char *cc1_options =
  %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
  %{g*} %{O*} %{W*} %{w} %{pedantic*} %{std*} %{ansi}\
  %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
- %{aux-info*} %{Qn:-fno-ident} %{--help:--help}\
+ %{Qn:-fno-ident} %{--help:--help}\
  %{--target-help:--target-help}\
  %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
  %{fsyntax-only:-o %j} %{-param*}";

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]