This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "-march=native" possibly being misled on Debian i386?


I wrote:
> Using the OS GCC (4.9.2, native build for i586-linux-gnu);
> WIthout, I get arch i586, tune generic.
> With, I get - ha! - "-march=native", and no tune.

This seems odd.

A bit more information now, pairs of command/output.

First on Debian 8, the OS provided 4.9.2 on my normal x86_64 machine.

gcc -E -x c /dev/null -v
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'

gcc -march=native -E -x c /dev/null -v
COLLECT_GCC_OPTIONS='-march=native' '-E' '-v'

gcc -mtune=native -E -x c /dev/null -v
COLLECT_GCC_OPTIONS='-mtune=native' '-E' '-v' '-march=x86-64'

gcc -march=native -mtune=native -E -x c /dev/null -v
COLLECT_GCC_OPTIONS='-march=native' '-mtune=native' '-E' '-v'

Interetin', eh?  tune is doing something, even though arch isn't.

Going back to the version 1 Minnowboard (Atom E640), Debian 8, the OS
provided GCC 4.9.2;

gcc -E -x c /dev/null -v
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=i586'

gcc -march=native -E -x c /dev/null -v
COLLECT_GCC_OPTIONS='-march=native' '-E' '-v'

gcc -mtune=native -E -x c /dev/null -v
COLLECT_GCC_OPTIONS='-mtune=native' '-E' '-v' '-march=i586'

gcc -march=native -mtune=native -E -x c /dev/null -v
COLLECT_GCC_OPTIONS='-march=native' '-mtune=native' '-E' '-v'

Superficially at least, -march is looking a bit messed up.  However,
it's more likely my expectation of what it is does is amiss =-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]