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?
Share
Unfortunately, that’s just the way
archworks on OS X. With current OS X systems,archreportsi386for 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 whenarchwas used to distinguish betweenppcandi386platforms when Intel support was first introduced in OS X. From the command line, more detailed information is available withsystem_profiler; seeman 8 system_profilerfor more details.