I regret not making better notes about exactly why I was looking for a full list of the pre-defined macros Apple made available for iOS development. I usually like starting an entry talking about why I was trying to solve a particular problem. While I made a note to write up what I found, I did not note why I needed it at the time. Assuming you are reading this because you need or might need such a thing, I’ll write on.
Some of the pre-defined macros are published in Apple’s documentation, but not all. (Well, as far as I remember anyway.) I feel the most confident that I didn’t miss one that could solve a problem when I get the list from the compiler itself.
While searching the internet I found instructions to use
1 |
gcc -arch i386 -dM -E - < /dev/null | sort |
I changed ‘i386’ to ‘armv6’ and ‘armv7’ but that failed on my setup. I don’t really know if I messed something up in the /Developer folder or if this line just generally won’t work for ARM.
The error message mentioned a missing file and after finding it, I changed the above command to this:
For Xcode 3.2.5:
1 |
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 -arch armv6 -dM -E - < /dev/null | sort |
1 |
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -arch armv7 -dM -E - < /dev/null | sort |