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

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

 



Erik Leunissen <e.leunissen@xxxxxxxxx> 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

[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