[Bug driver/31107] New: --target-help doesn't say which options are compiler, assembler or linker options

fxcoudert at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 9 15:18:00 GMT 2007


--target-help shows compiler, assembler and linker options together, without
saying which is which. It can confuse users (see PR31073 for example).

Example: on i686-pc-linux-gnu, with mainline:

$ gcc --target-help | tail -n 35
  -mtune=                     Schedule code for given CPU
  -muclibc                    Use uClibc instead of GNU libc

  -Q                      ignored
  -V                      print assembler version number
  -k                      ignored
  -n                      Do not optimize code alignment
  -q                      quieten some warnings
  -s                      ignored
  --divide                ignored
elf_i386: 
  -Bgroup               Selects group name lookup rules for DSO
  --disable-new-dtags   Disable new dynamic tags
  --enable-new-dtags    Enable new dynamic tags
  --eh-frame-hdr        Create .eh_frame_hdr section
  -z combreloc          Merge dynamic relocs into one section and sort
  -z defs               Report unresolved symbols in object files.
  -z execstack          Mark executable as requiring executable stack
  -z initfirst          Mark DSO to be initialized first at runtime
  -z interpose          Mark object to interpose all DSOs but executable
  -z loadfltr           Mark object requiring immediate process
  -z muldefs            Allow multiple definitions
  -z nocombreloc        Don't merge dynamic relocs into one section
  -z nocopyreloc        Don't create copy relocs
  -z nodefaultlib       Mark object not to use default search paths
  -z nodelete           Mark DSO non-deletable at runtime
  -z nodlopen           Mark DSO not available to dlopen
  -z nodump             Mark DSO not available to dldump
  -z noexecstack        Mark executable as not requiring executable stack
  -z norelro            Don't create RELRO program header
  -z now                Mark object non-lazy runtime binding
  -z origin             Mark object requiring immediate $ORIGIN processing
                          at runtime
  -z relro              Create RELRO program header
  -z KEYWORD            Ignored for Solaris compatibility

The first options displayed above are the last of the compiler options,
followed (without any explicit mention) by the assembler options, and the
linker options.

Users then want to try an option in the list, and it doesn't work:
$ gcc --eh-frame-hdr a.c      
cc1: error: unrecognized command line option "-feh-frame-hdr"


-- 
           Summary: --target-help doesn't say which options are compiler,
                    assembler or linker options
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31107



More information about the Gcc-bugs mailing list