Interplay of options -m32 and -march on x86_64 host
Ian Lance Taylor
iant@google.com
Wed Sep 30 14:38:00 GMT 2009
Erik Leunissen <e.leunissen@hccnet.nl> writes:
> Is i686 a default for "-m32" by convention? Or is this just what happens
> to be the default provided by the specific Linux distro that I'm using?
If you use -m32 without a -march option, you will get the architecture
for which gcc was configured, adjusted to only permit 32-bit
instructions. This would typically not be i686, but that is likely to
be the closest of the set i386, i486, i586, i686. The i686
(Pentium-II) is the newest of that set though it long precedes 64-bit
mode. There isn't necessarily any 32-bit processor which precisely
corresponds to the default 64-bit processor. One which would be
fairly close to a typical default would be pentium4.
> I also investigated the output of "gcc -dumpspecs" to search for any
> such default setting, but there was no specific reference to i686. The
> only output section that I could associate with a possible default
> architecture was:
>
> <-- snip -->
>
> *link:
> %{!static:--eh-frame-hdr} %{!m32:-m elf_x86_64} %{m32:-m elf_i386}
>
> <-- snip -->
>
> Not sure how to interpret this (or if it is relevant at all).
That is not relevant. That just controls the default linker emulation
mode.
Ian
More information about the Gcc-help
mailing list