On 26 December 2012 09:35, Алексей Павлов wrote: > Hi! > When I building 32-bit mingw-w64 multilib runtime without > -march\-mtune its very well, but if I use -march=i686 -mtune=core2 I > have error: > "CPU you selected does not support x86-64 instruction set" > And I have some questions: > 1. If I don't specify any -march/-mtune what is used by default in GCC > when I build multilib toolchain? For x86 targets the default arch is taken from the target triplet, so for x86_64-unknown-linux-gnu the default arch is x86-64. For your mingw-64 target it will be whatever the first part of the triplet is. The default tuning is the same as the arch. > 2. Can I build multilib toolchain with -march=i686 or it's impossible? If you can arrange for -march=i686 to only be used when building 32-bit objects it will work, otherwise you'll try to build 64-bit objects with -march=i686 which is obviously nonsensical. GCC can be built with --with-arch-32=i686 which sets the default 32-bit arch to i686, without affecting the 64-bit arch. > 3. If I use toolchain builded without -march/-mtune it generate > incorrect code with -march=corei7-avx. Is it GCC FEATURE or BUG? You haven't given nearly enough information, but it sounds like a bug.