This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

new option --target-help



The following patch is used to support --target-help option. This patch 
has been approved long back but i haven't checked in yet which i am going 
to do it now.

Thanks
Chandra

        * as.c: New option OPTION_TARGET_HELP. Prints all target specific
        options.
        * doc/as.texinfo: Added notes about this new option.
        * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
        options.
        * ld.texinfo: Added notes about this new option.

Index: as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.14
diff -p -r1.14 as.c
*** as.c	2000/07/06 07:25:02	1.14
--- as.c	2000/10/17 18:55:27
*************** Options:\n\
*** 266,271 ****
--- 266,273 ----
    fprintf (stream, _("\
    --help                  show this message and exit\n"));
    fprintf (stream, _("\
+   --target-help           show target specific options\n"));
+   fprintf (stream, _("\
    -I DIR                  add DIR to search list for .include directives\n"));
    fprintf (stream, _("\
    -J                      don't warn about signed overflow\n"));
*************** parse_args (pargc, pargv)
*** 421,427 ****
      {"no-warn", no_argument, NULL, 'W'},
  #define OPTION_WARN (OPTION_STD_BASE + 18)
      {"warn", no_argument, NULL, OPTION_WARN},
! #define OPTION_WARN_FATAL (OPTION_STD_BASE + 19)
      {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
    };
  
--- 423,431 ----
      {"no-warn", no_argument, NULL, 'W'},
  #define OPTION_WARN (OPTION_STD_BASE + 18)
      {"warn", no_argument, NULL, OPTION_WARN},
! #define OPTION_TARGET_HELP (OPTION_STD_BASE + 19)
!     {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
! #define OPTION_WARN_FATAL (OPTION_STD_BASE + 20)
      {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
    };
  
*************** parse_args (pargc, pargv)
*** 496,501 ****
--- 500,509 ----
  	  new_argv[new_argc++] = optarg;
  	  new_argv[new_argc] = NULL;
  	  break;
+ 	
+ 	case OPTION_TARGET_HELP:
+           md_show_usage (stdout);
+           exit (EXIT_SUCCESS);
  
  	case OPTION_HELP:
  	  show_usage (stdout);
Index: doc/as.texinfo
===================================================================
RCS file: /cvs/src/src/gas/doc/as.texinfo,v
retrieving revision 1.15
diff -p -r1.15 as.texinfo
*** as.texinfo	2000/06/20 13:52:29	1.15
--- as.texinfo	2000/10/17 18:55:27
*************** Here is a brief summary of how to invoke
*** 205,211 ****
   [ -f ] [ --gstabs ] [ --gdwarf2 ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ]
   [ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ]
   [ -version ] [ --version ] [ -W ] [ --warn ] [ --fatal-warnings ] 
!  [ -w ] [ -x ] [ -Z ]
  @ifset A29K
  @c am29k has no machine-dependent assembler options
  @end ifset
--- 205,211 ----
   [ -f ] [ --gstabs ] [ --gdwarf2 ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ]
   [ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ]
   [ -version ] [ --version ] [ -W ] [ --warn ] [ --fatal-warnings ] 
!  [ -w ] [ -x ] [ -Z ] [ --target-help ]
  @ifset A29K
  @c am29k has no machine-dependent assembler options
  @end ifset
*************** may help debugging assembler code, if th
*** 342,347 ****
--- 342,350 ----
  
  @item --help
  Print a summary of the command line options and exit.
+ 
+ @item --target-help
+ Print a summary of all target specific options and exit.
  
  @item -I @var{dir}
  Add directory @var{dir} to the search list for @code{.include} directives.
Index: ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.17
diff -p -r1.17 ld.texinfo
*** ld.texinfo	2000/06/20 13:29:06	1.17
--- ld.texinfo	2000/10/17 19:04:23
*************** specifying @samp{--no-gc-sections} on th
*** 895,900 ****
--- 895,904 ----
  @item --help
  Print a summary of the command-line options on the standard output and exit.
  
+ @kindex --target-help
+ @item --target-help
+ Print a summary of all target specific options on the standard output and exit.
+ 
  @kindex -Map
  @item -Map @var{mapfile}
  Print a link map to the file @var{mapfile}.  See the description of the
Index: lexsup.c
===================================================================
RCS file: /cvs/src/src/ld/lexsup.c,v
retrieving revision 1.16
diff -p -r1.16 lexsup.c
*** lexsup.c	2000/07/08 13:35:05	1.16
--- lexsup.c	2000/10/17 19:04:24
*************** int parsing_defsym = 0;
*** 124,129 ****
--- 124,130 ----
  #define OPTION_INIT                     (OPTION_NO_UNDEFINED + 1)
  #define OPTION_FINI                     (OPTION_INIT + 1)
  #define OPTION_SECTION_START		(OPTION_FINI + 1)
+ #define OPTION_TARGET_HELP              (OPTION_SECTION_START + 1)
  
  /* The long options.  This structure is used for both the option
     parsing and the help text.  */
*************** static const struct ld_option ld_options
*** 333,338 ****
--- 334,341 ----
        '\0', N_("COUNT"), N_("Split output sections every COUNT relocs"), TWO_DASHES },
    { {"stats", no_argument, NULL, OPTION_STATS},
        '\0', NULL, N_("Print memory usage statistics"), TWO_DASHES },
+   { {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
+       '\0', NULL, N_("Display target specific options"), TWO_DASHES },
    { {"task-link", required_argument, NULL, OPTION_TASK_LINK},
        '\0', N_("SYMBOL"), N_("Do task level linking"), TWO_DASHES },
    { {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
*************** parse_args (argc, argv)
*** 882,887 ****
--- 885,894 ----
  	    set_section_start (sec_name, optarg2);
  	  }
  	  break;
+ 	case OPTION_TARGET_HELP:
+ 	  /* Mention any target specific options.  */
+           ldemul_list_emulation_options (stdout);
+           exit (0);
  	case OPTION_TBSS:
  	  set_section_start (".bss", optarg);
  	  break;





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