Is there a way to change the specs file so that it will pass -march=native
if nothing is specified in command line?
Related things in the default specs file is:
*cc1:
%(cc1_cpu)
*cc1_cpu:
%{march=native:%>march=native %:local_cpu_detect(arch) %{!mtune=*:%>mtune=native %:local_cpu_detect(tune)}} %{mtune=native:%>mtune=native %:local_cpu_detect(tune)}
I am not sure how specs works. Simply specifying -march=native
before or after %(cc1_cpu)
doesn't work. However, this line does take effect because GCC will report error if I put -something_wierd
instead of -march=native
.
Another thing I noticed is if I put %{march=i386:-something_wierd}
before %(cc1_cpu)
, gcc reports error so looks like -march=i386
is always passed in if nothing is specified, so is there a way to distinguish between nothing specified and -march=i386
in specs file?
BTW, what does %>
do? Seems like it is not specified in the documentation.
I am using MinGW's gcc-4.6.2
.