Bug 43718 - march does not display --help=target enable/disable correctly
Summary: march does not display --help=target enable/disable correctly
Status: RESOLVED DUPLICATE of bug 39851
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.3
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2010-04-11 00:01 UTC by Kevin
Modified: 2012-06-01 14:05 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin 2010-04-11 00:01:35 UTC
The -msse* options are not enabled by -march=core2. The gcc doc states:
core2
Intel Core2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 instruction set support.

-mtune=core2 is not implied by -march=core2. The gcc doc states:
-march=cpu-type
...  Moreover, specifying -march=cpu-type implies -mtune=cpu-type.

$ gcc -march=core2  -Q --help=target -v &> gcc.core2
$ gcc -march=native -Q --help=target -v &> gcc.native
$ diff gcc.core2 gcc.native 
6,7c6,7
< COLLECT_GCC_OPTIONS='-march=core2' '-Q' '-fhelp=target' '-v'
<  /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/cc1 -v help-dummy -dumpbase help-dummy -march=core2 -auxbase help-dummy -version -fhelp=target -o /tmp/ccEak63E.s
---
> COLLECT_GCC_OPTIONS= '-Q' '-fhelp=target' '-v'
>  /usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/cc1 -v help-dummy -march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -dumpbase help-dummy -auxbase help-dummy -version -fhelp=target -o /tmp/cc5b5n0x.s                                                                            
30c30
<   -mcx16                                      [disabled]
---
>   -mcx16                                      [enabled]
52c52
<   -mno-sse4                                   [enabled]
---
>   -mno-sse4                                   [disabled]
63c63
<   -msahf                                      [disabled]
---
>   -msahf                                      [enabled]
65,66c65,66
<   -msse                                       [disabled]
<   -msse2                                      [disabled]
---
>   -msse                                       [enabled]
>   -msse2                                      [enabled]
68c68
<   -msse3                                      [disabled]
---
>   -msse3                                      [enabled]
70c70
<   -msse4.1                                    [disabled]
---
>   -msse4.1                                    [enabled]
75c75
<   -mssse3                                     [disabled]
---
>   -mssse3                                     [enabled]
81c81
<   -mtune=                     
---
>   -mtune=                                     core2
85,86c85,86
< COLLECT_GCC_OPTIONS='-march=core2' '-Q' '-fhelp=target' '-v'
<  as -V -Qy -o /tmp/ccB1vZZ0.o /tmp/ccEak63E.s
---
> COLLECT_GCC_OPTIONS= '-Q' '-fhelp=target' '-v'
>  as -V -Qy -o /tmp/ccxxWZjC.o /tmp/cc5b5n0x.s

$ uname -a
Linux J 2.6.33-ARCH #1 SMP PREEMPT Sun Apr 4 10:27:30 CEST 2010 x86_64 Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz GenuineIntel GNU/Linux

Thanks
Comment 1 Andrew Pinski 2010-04-12 20:44:40 UTC
I think this is really an issue of how --help=target is displaying the enable/disable part.
Comment 2 Andrew Pinski 2010-04-12 20:48:23 UTC
OVERRIDE_OPTIONS is called after the printing out the --help message.
Comment 3 Alexander Monakov 2012-06-01 14:05:12 UTC
Marking as a duplicate of an earlier bug which is confirmed.

*** This bug has been marked as a duplicate of bug 39851 ***