GNU C compiler passes the wrong architecture name to the linker. For example
gcc helloworld.i throws the error
ld: unknown/unsupported architecture name: -arch arm. After some experimenting with LD, it seems
armv7 is the architecture I should use. The compiling and assembling operations seem to work fine.
It appears that the compiler collection (iphone-gcc) is designed to work with an older version of the linker provided through the open-source Darwin CC Tools, not the newer LD64 I have installed provided as a stand-alone outside the CC tool collection. Is there any way to tell GCC to pass another architecture to the linker? Passing
-Xlinker -arch -Xlinker armv7 to GCC gives the same error.