Re: Interplay of options -m32 and -march on x86_64 host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Lance Taylor wrote:

>
> Yes, you can.
>

OK. After some experimenting, I indeed found that supplying an
additional "-march=<arch>" (combined with a fixed -O2 optimization
flag), produced a different binary when varying <arch> over the
sequence i386, i486, i586 and i686.

Only through this experimentation, I found that using "-m32" in the
absence of any "-march=" specifier results in a binary that is the same
as when I supply "-m32 -march=i686". From this, I deduce that the
default architecture for "-m32" is i686.

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?

Thanks in advance for any pointers,

Erik Leunissen
--

By the way:
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).


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux