I was trying to figure out what CPU architecture my MacBook has to try and figure out why NASM wasn't working with an x86_64 gcc. The arch command returned i386. However, I can run i386 and x86_64 binaries, and according to System Info, I have a 64-bit CPU (Intel i7). Not only that, but when I run lipo -info on /usr/bin/arch, it says that it is a fat file with i386 and x86_64 architectures. If I'm not running an i386 system, why does arch say that I am?
As the original implementation of the 32-bit extension of the 80286 architecture, the i386 instruction set, programming model, and binary encodings are still the common denominator for all 32-bit x86 processors, which is termed the i386-architecture, x86, or IA-32, depending on context. i386.
The arch command can be used to alter the operating system's normal selection order. The most common use is to select the 32-bit architec- ture on a 64-bit processor, even if a 64-bit architecture is available.
Unfortunately, that's just the way arch
works on OS X. With current OS X systems, arch
reports i386
for Intel architectures that are capable of running 32-bit; it doesn't tell you whether they can run 64-bit or not. The behavior appears to be a legacy of when arch
was used to distinguish between ppc
and i386
platforms when Intel support was first introduced in OS X. From the command line, more detailed information is available with system_profiler
; see man 8 system_profiler
for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With