Separate names with a comma.
Discussion in 'Mac Basics and Help' started by sam_hansen77, May 13, 2017.
Hi. When using gcc, what is the difference between -arch i386 versus -m32?
On Intel processors -m32 says generate code for 32 bit processors (which would also run on 64 bit processors though caution is advised if mixing 32 and 64 bit code). To quote the docs "The -m32 option sets int, long, and pointer types to 32 bits, and generates code that runs on any i386 system."
I assume you meant -march i386 as the other part of the question. That means generate code specifically for the 386 processor. This code may not run on any other sort of processor (but is hopefully more efficient on the i386 than it would be otherwise). My guess is this code _will_ run on newer processors as well, but there are no guarantees and I haven't tried it myself. As the 386 was a 32 bit processor I guess it implies -m32 as well.