This is the mail archive of the
mailing list for the GCC project.
Question on repeating -march flags
- From: Yuri D'Elia <wavexx at thregr dot org>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 23 Dec 2015 13:02:19 +0100
- Subject: Question on repeating -march flags
- Authentication-results: sourceware.org; auth=none
I couldn't find anything on the matter, but what happens if -march is
repeated more than once? I would assume the usual behavior that the
last flag "wins".
On a haswell host, the following:
gcc -march=native -march=opteron
gcc -march=opteron -march=native
both emit code which is illegal for the opteron ISA, as if -march=native
had special treatment. Specifying -march=opteron alone works as intended.
Since I generally override the default flags in makefiles by appending
exceptions where needed, I'd sort of expected the regular behavior.
Is this intended? If not, should I try to generate a small test case?