From a7b2e1845f0c20da4ed6462161f58f706a587d44 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Wed, 21 Oct 2015 22:24:41 +0000 Subject: Improve --help output to generate references to option aliases. gcc/ PR driver/68043 * opts.c (undocumented_msg, use_diagnosed_msg): New globals. (print_filtered_help): Reference aliased option's name and encourage readers to use it in preference to the alias if the former is not documented. Mention when using an option is diagnosed. * gcc.c (display_help): End each sentence with a period. * ada/gcc-interface/lang.opt: End each sentence that describes an option with a period. * c-family/c.opt: Same. * common.opt: Same. * config/aarch64/aarch64.opt: Same. * config/alpha/alpha.opt: Same. * config/arc/arc.opt: Same. * config/arm/arm.opt: Same. * config/avr/avr.opt: Same. * config/bfin/bfin.opt: Same. * config/c6x/c6x.opt: Same. * config/cr16/cr16.opt: Same. * config/cris/cris.opt: Same. * config/cris/linux.opt: Same. * config/darwin.opt: Same. * config/epiphany/epiphany.opt: Same. * config/fr30/fr30.opt: Same. * config/frv/frv.opt: Same. * config/ft32/ft32.opt: Same. * config/g.opt: Same. * config/h8300/h8300.opt: Same. * config/i386/cygming.opt: Same. * config/i386/djgpp.opt: Same. * config/i386/i386.opt: Same. * config/i386/interix.opt: Same. * config/i386/mingw-w64.opt: Same. * config/i386/mingw.opt: Same. * config/ia64/ia64.opt: Same. * config/ia64/ilp32.opt: Same. * config/iq2000/iq2000.opt: Same. * config/linux.opt: Same. * config/lm32/lm32.opt: Same. * config/lynx.opt: Same. * config/m32c/m32c.opt: Same. * config/m32r/m32r.opt: Same. * config/m68k/ieee.opt: Same. * config/m68k/m68k.opt: Same. * config/mcore/mcore.opt: Same. * config/mep/mep.opt: Same. * config/microblaze/microblaze.opt: Same. * config/mips/mips.opt: Same. * config/mmix/mmix.opt: Same. * config/mn10300/mn10300.opt: Same. * config/moxie/moxie.opt: Same. * config/msp430/msp430.opt: Same. * config/nios2/elf.opt: Same. * config/nios2/nios2.opt: Same. * config/nvptx/nvptx.opt: Same. * config/pa/pa-hpux.opt: Same. * config/pa/pa-hpux1010.opt: Same. * config/pa/pa-hpux1111.opt: Same. * config/pa/pa-hpux1131.opt: Same. * config/pa/pa.opt: Same. * config/pa/pa64-hpux.opt: Same. * config/pdp11/pdp11.opt: Same. * config/rl78/rl78.opt: Same. * config/rs6000/476.opt: Same. * config/rs6000/aix64.opt: Same. * config/rs6000/darwin.opt: Same. * config/rs6000/linux64.opt: Same. * config/rs6000/rs6000.opt: Same. * config/rs6000/sysv4.opt: Same. * config/s390/s390.opt: Same. * config/s390/tpf.opt: Same. * config/sh/sh.opt: Same. * config/sol2.opt: Same. * config/sparc/long-double-switch.opt: Same. * config/sparc/sparc.opt: Same. * config/spu/spu.opt: Same. * config/stormy16/stormy16.opt: Same. * config/tilegx/tilegx.opt: Same. * config/tilepro/tilepro.opt: Same. * config/v850/v850.opt: Same. * config/vax/vax.opt: Same. * config/visium/visium.opt: Same. * config/vms/vms.opt: Same. * config/vxworks.opt: Same. * config/xtensa/xtensa.opt: Same. * fortran/lang.opt: Same. testsuite/ PR driver/68043 * gcc.misc-tests/help.exp: Adjust. * lib/options.exp (check_for_options): Add detail to output. From-SVN: r229155 --- gcc/gcc.c | 90 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index 7f5a36e..bbc9b23 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3366,63 +3366,63 @@ display_help (void) printf (_("Usage: %s [options] file...\n"), progname); fputs (_("Options:\n"), stdout); - fputs (_(" -pass-exit-codes Exit with highest error code from a phase\n"), stdout); - fputs (_(" --help Display this information\n"), stdout); - fputs (_(" --target-help Display target specific command line options\n"), stdout); - fputs (_(" --help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...]\n"), stdout); - fputs (_(" Display specific types of command line options\n"), stdout); + fputs (_(" -pass-exit-codes Exit with highest error code from a phase.\n"), stdout); + fputs (_(" --help Display this information.\n"), stdout); + fputs (_(" --target-help Display target specific command line options.\n"), stdout); + fputs (_(" --help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...].\n"), stdout); + fputs (_(" Display specific types of command line options.\n"), stdout); if (! verbose_flag) - fputs (_(" (Use '-v --help' to display command line options of sub-processes)\n"), stdout); - fputs (_(" --version Display compiler version information\n"), stdout); - fputs (_(" -dumpspecs Display all of the built in spec strings\n"), stdout); - fputs (_(" -dumpversion Display the version of the compiler\n"), stdout); - fputs (_(" -dumpmachine Display the compiler's target processor\n"), stdout); - fputs (_(" -print-search-dirs Display the directories in the compiler's search path\n"), stdout); - fputs (_(" -print-libgcc-file-name Display the name of the compiler's companion library\n"), stdout); - fputs (_(" -print-file-name= Display the full path to library \n"), stdout); - fputs (_(" -print-prog-name= Display the full path to compiler component \n"), stdout); + fputs (_(" (Use '-v --help' to display command line options of sub-processes).\n"), stdout); + fputs (_(" --version Display compiler version information.\n"), stdout); + fputs (_(" -dumpspecs Display all of the built in spec strings.\n"), stdout); + fputs (_(" -dumpversion Display the version of the compiler.\n"), stdout); + fputs (_(" -dumpmachine Display the compiler's target processor.\n"), stdout); + fputs (_(" -print-search-dirs Display the directories in the compiler's search path.\n"), stdout); + fputs (_(" -print-libgcc-file-name Display the name of the compiler's companion library.\n"), stdout); + fputs (_(" -print-file-name= Display the full path to library .\n"), stdout); + fputs (_(" -print-prog-name= Display the full path to compiler component .\n"), stdout); fputs (_("\ -print-multiarch Display the target's normalized GNU triplet, used as\n\ - a component in the library path\n"), stdout); - fputs (_(" -print-multi-directory Display the root directory for versions of libgcc\n"), stdout); + a component in the library path.\n"), stdout); + fputs (_(" -print-multi-directory Display the root directory for versions of libgcc.\n"), stdout); fputs (_("\ -print-multi-lib Display the mapping between command line options and\n\ - multiple library search directories\n"), stdout); - fputs (_(" -print-multi-os-directory Display the relative path to OS libraries\n"), stdout); - fputs (_(" -print-sysroot Display the target libraries directory\n"), stdout); - fputs (_(" -print-sysroot-headers-suffix Display the sysroot suffix used to find headers\n"), stdout); - fputs (_(" -Wa, Pass comma-separated on to the assembler\n"), stdout); - fputs (_(" -Wp, Pass comma-separated on to the preprocessor\n"), stdout); - fputs (_(" -Wl, Pass comma-separated on to the linker\n"), stdout); - fputs (_(" -Xassembler Pass on to the assembler\n"), stdout); - fputs (_(" -Xpreprocessor Pass on to the preprocessor\n"), stdout); - fputs (_(" -Xlinker Pass on to the linker\n"), stdout); - fputs (_(" -save-temps Do not delete intermediate files\n"), stdout); - fputs (_(" -save-temps= Do not delete intermediate files\n"), stdout); + multiple library search directories.\n"), stdout); + fputs (_(" -print-multi-os-directory Display the relative path to OS libraries.\n"), stdout); + fputs (_(" -print-sysroot Display the target libraries directory.\n"), stdout); + fputs (_(" -print-sysroot-headers-suffix Display the sysroot suffix used to find headers.\n"), stdout); + fputs (_(" -Wa, Pass comma-separated on to the assembler.\n"), stdout); + fputs (_(" -Wp, Pass comma-separated on to the preprocessor.\n"), stdout); + fputs (_(" -Wl, Pass comma-separated on to the linker.\n"), stdout); + fputs (_(" -Xassembler Pass on to the assembler.\n"), stdout); + fputs (_(" -Xpreprocessor Pass on to the preprocessor.\n"), stdout); + fputs (_(" -Xlinker Pass on to the linker.\n"), stdout); + fputs (_(" -save-temps Do not delete intermediate files.\n"), stdout); + fputs (_(" -save-temps= Do not delete intermediate files.\n"), stdout); fputs (_("\ -no-canonical-prefixes Do not canonicalize paths when building relative\n\ - prefixes to other gcc components\n"), stdout); - fputs (_(" -pipe Use pipes rather than intermediate files\n"), stdout); - fputs (_(" -time Time the execution of each subprocess\n"), stdout); - fputs (_(" -specs= Override built-in specs with the contents of \n"), stdout); - fputs (_(" -std= Assume that the input sources are for \n"), stdout); + prefixes to other gcc components.\n"), stdout); + fputs (_(" -pipe Use pipes rather than intermediate files.\n"), stdout); + fputs (_(" -time Time the execution of each subprocess.\n"), stdout); + fputs (_(" -specs= Override built-in specs with the contents of .\n"), stdout); + fputs (_(" -std= Assume that the input sources are for .\n"), stdout); fputs (_("\ --sysroot= Use as the root directory for headers\n\ - and libraries\n"), stdout); - fputs (_(" -B Add to the compiler's search paths\n"), stdout); - fputs (_(" -v Display the programs invoked by the compiler\n"), stdout); - fputs (_(" -### Like -v but options quoted and commands not executed\n"), stdout); - fputs (_(" -E Preprocess only; do not compile, assemble or link\n"), stdout); - fputs (_(" -S Compile only; do not assemble or link\n"), stdout); - fputs (_(" -c Compile and assemble, but do not link\n"), stdout); - fputs (_(" -o Place the output into \n"), stdout); - fputs (_(" -pie Create a position independent executable\n"), stdout); - fputs (_(" -shared Create a shared library\n"), stdout); + and libraries.\n"), stdout); + fputs (_(" -B Add to the compiler's search paths.\n"), stdout); + fputs (_(" -v Display the programs invoked by the compiler.\n"), stdout); + fputs (_(" -### Like -v but options quoted and commands not executed.\n"), stdout); + fputs (_(" -E Preprocess only; do not compile, assemble or link.\n"), stdout); + fputs (_(" -S Compile only; do not assemble or link.\n"), stdout); + fputs (_(" -c Compile and assemble, but do not link.\n"), stdout); + fputs (_(" -o Place the output into .\n"), stdout); + fputs (_(" -pie Create a position independent executable.\n"), stdout); + fputs (_(" -shared Create a shared library.\n"), stdout); fputs (_("\ - -x Specify the language of the following input files\n\ + -x Specify the language of the following input files.\n\ Permissible languages include: c c++ assembler none\n\ 'none' means revert to the default behavior of\n\ - guessing the language based on the file's extension\n\ + guessing the language based on the file's extension.\n\ "), stdout); printf (_("\ -- cgit v1.1