Forum > Other OS
IOS
Cooler:
How do you build 64-bit code for ARM?
I've created an empty program and ppca64 compiles it, but can't link because there is no libc.dylib for ARM64 architecture. I searched over the whole drive (I have IOS 9 SDK installed with XCode 7) and found some libc.dylib but just for simulator platform, not iPhoneOS platform.
ppcarm works fine for ARMv7 architecture, but Apple requires 64-bit code, so it's not enough.
Jonas Maebe:
--- Quote from: Cooler on January 22, 2016, 10:56:48 pm ---How do you build 64-bit code for ARM?
I've created an empty program and ppca64 compiles it, but can't link because there is no libc.dylib for ARM64 architecture. I searched over the whole drive (I have IOS 9 SDK installed with XCode 7) and found some libc.dylib but just for simulator platform, not iPhoneOS platform.
ppcarm works fine for ARMv7 architecture, but Apple requires 64-bit code, so it's not enough.
--- End quote ---
You have to tell the compiler the location of the SDK to use with the -XR parameter. The reason is that by default, the compiler tries to link the system versions of the libraries, which do not contain AArch64 code (although they don't contain ARM code either, so I'm not sure why that work for you). Normally,
--- Code: ----XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
--- End code ---
should work (both for ARM and AArch64/ARM64).
Navigation
[0] Message Index
[*] Previous page