Overwriting invalid -march later in the command line has an inconsistency Following works gcc -march=no-automagic -march=core2 gcc -march=no-automagic -march=pentium-m Following breaks gcc -march=no-automagic -march=native I would prefer that the build always breaks with error: bad value (no-automagic) for -march= switch but we should at least have the same behavior for both cases.
Confirmed: $ echo | /home/msebor/build/gcc-trunk-svn/gcc/xgcc -B/home/msebor/build/gcc-trunk-svn/gcc -S -march=foobar -march=core2 -o/dev/null -xc - $ echo | /home/msebor/build/gcc-trunk-svn/gcc/xgcc -B/home/msebor/build/gcc-trunk-svn/gcc -S -march=foobar -march=native -o/dev/null -xc - <stdin>:1:0: error: bad value (foobar) for -march= switch This seems to be due to the special treatment of -march=native by the i386 driver which forces it before any other -march= options, even if they are specified first on the command line.
(In reply to Martin Sebor from comment #1) > Confirmed: > > $ echo | /home/msebor/build/gcc-trunk-svn/gcc/xgcc > -B/home/msebor/build/gcc-trunk-svn/gcc -S -march=foobar -march=core2 > -o/dev/null -xc - > > $ echo | /home/msebor/build/gcc-trunk-svn/gcc/xgcc > -B/home/msebor/build/gcc-trunk-svn/gcc -S -march=foobar -march=native > -o/dev/null -xc - > <stdin>:1:0: error: bad value (foobar) for -march= switch > > This seems to be due to the special treatment of -march=native by the i386 > driver which forces it before any other -march= options, even if they are > specified first on the command line. Any progress?
*** Bug 103421 has been marked as a duplicate of this bug. ***