Bug 45731 - Header missing for assembler option help.
Summary: Header missing for assembler option help.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.5.1
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-20 04:20 UTC by David
Modified: 2011-02-12 21:31 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.6.0
Known to fail:
Last reconfirmed: 2010-09-20 09:30:32


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2010-09-20 04:20:20 UTC
hello.c:1: error: bad value (corei7) for -march= switch

although, gcc451 --help=target -march=corei7 is successful.

gcc 4.4.4-10.fc13 (fedora 13 distribution) fails as well.

gcc451 -march=generic produces .s code with -march=core2

configured with:
../gcc-4.5.1/configure --prefix=/usr/local --program-suffix=451 --enable-threads \
--enable-languages=c,c++
Comment 1 Andrew Pinski 2010-09-20 04:27:25 UTC
>-march=corei7 is successful.

Yes and that is kinda expected as --help does not process options at all really.
Comment 2 David 2010-09-20 06:25:48 UTC
And yet, it does not help (with or without dashes) that corei7 is claimed to be supported and yet is not.

Either --target-help should not report support or gcc should actually support it.
Comment 3 Richard Biener 2010-09-20 09:30:31 UTC
(In reply to comment #2)
> And yet, it does not help (with or without dashes) that corei7 is claimed to be
> supported and yet is not.

--target-help is documented as alias for --help=target, but that doesn't
print this help - which means that the 2nd half of --target-help is from
the assembler and linker:

  -mveclibabi=                Vector library ABI to use
  -mxop                       Support XOP built-in functions and code
                              generation 

... end of GCC options, assembler options starting:

  -Q                      ignored
  -V                      print assembler version number

...

Linker options
==============

Use "-Wl,OPTION" to pass "OPTION" to the linker.

...


which means a proper header is missing for Assembler options.
Comment 4 Joseph S. Myers 2011-02-12 21:29:18 UTC
Author: jsm28
Date: Sat Feb 12 21:29:14 2011
New Revision: 170091

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170091
Log:
	PR driver/45731
	* gcc.c (asm_options): Correct spec matching --target-help.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcc.c
Comment 5 Joseph S. Myers 2011-02-12 21:31:06 UTC
Fixed for 4.6.