SDL 1.3 for iOS (device build)

First I should mention that I’m using the latest iOS 4.2 SDK.

I can build 1.3 for the iOS simulator, but when I make a device build using either armv6 or armv7 I get the following errors when compiling SDL_spinlock.c:

Code:
{standard input}:57:selected processor does not support ldrex r1,[r3]' {standard input}:58:selected processor does not supportteq r1,#0
{standard input}:59:selected processor does not support `strexeq r1,r2,[r3]'
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

and

Code:

{standard input}:60:thumb conditional instruction not in IT block
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

It looks like the offending code in SDL_AtomicTryLock() is (after the #else):

Code:
#if defined(arm)
#ifdef ARM_ARCH_5
int result;
asm volatile (
“swp %0, %1, [%2]\n”
: “=&r,&r” (result) : “r,0” (1), “r,r” (lock) : “memory”);
return (result == 0);
#else
int result;
asm volatile (
“ldrex %0, [%2]\nteq %0, #0\nstrexeq %0, %1, [%2]”
: “=&r” (result) : “r” (1), “r” (lock) : “cc”, “memory”);
return (result == 0);
#endif

Any one else see this?

I also could not build from the source fetched from hg because the file SDL_revision.h was not found but the .zip of SDL 1.3 on the download page had it so I copied it over and got past that problem.