Difference between --target=i386 and i686

J.W. Jagersma jwjagersma@gmail.com
Fri Feb 21 23:22:00 GMT 2020

On 2020-02-21 18:38, J.W. Jagersma wrote:
> On 2020-02-19 00:16, Jim Wilson wrote:
>> On Wed, Feb 12, 2020 at 9:10 AM J.W. Jagersma <jwjagersma@gmail.com> wrote:
>>> i686-gcc -march=i386: cmov (!)
>> Did you check to see where the cmov instruction is coming from?  The
>> compiler won't generate it with -march=i386, but there may be a
>> precompiled library like libgcc or libstdc++ that contains the cmov
>> instruction because they were compiled for i686.  In order to get the
>> right effect with -march=i386, you would need to build multiple copies
>> of the libraries, one of them with -march=i386.  We call this
>> multilibs.  This is normally done with -m32/-m64 so a single compiler
>> can generate both 32-bit and 64-bit code, but it is not normally done
>> with i386 and i686.  You would have to change the default
>> configuration to build multilibs based on -march.
> Say I wanted to do build multilibs for x86, where would I start? I've
> been looking through the configure/make files but I don't see how it's
> done.

Nevermind that, I found it in the documentation here:

More information about the Gcc-help mailing list