c++ - 在gcc中同时使用“-arch i386”和"-arch x86_64"是什么意思?
阿神
阿神 2017-04-17 11:18:42
0
1
528

难道编译出来的结果同时支持x86和x64么

阿神
阿神

闭关修行中......

reply all(1)
伊谢尔伦

I don’t know gcc, but let’s analyze it from a CPU perspective:

i386 is the name of Intel's earlier 32-bit processor. It is in the same series as i486, i586, etc. This series is also called x86. And it maintains the backward compatibility feature of 486 being compatible with 386. Specifying i386 can achieve the widest compatibility with 32-bit processors

But Intel lost to AMD in 64-bit processors. AMD took the lead in launching a 32-bit compatible 64-bit processor based on x86, and it gained market recognition and was called amd64. Since this 64-bit processor can also run in 32-bit mode, it is also called x86-64.

has actually only developed into two commonly used standards so far, one is Intel's 32-bit standard x86, and the other is AMD's 64-bit standard amd64 (although amd64 is also developed from x86 ).

Of course Intel also has its own 64-bit standard called IA-64, which is the Itanium processor.

Based on my understanding, to answer your question:
i386The target CPU platform of the compiled program can only be 32-bit compatible
x86-64The target CPU platform of the compiled program can only be 64-bit compatible

The above analysis is only my personal understanding, please correct me if there is anything wrong.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template