Sun 12 Apr 2015 10:39:10 PM UTC, comment #4:
Again, great feedback. I checked https://wiki.debian.org/Arm64Port and I checked the Android SDK toolkit names, and I determined that the GNU-blessed name of the architecture is apparently "aarch64".
As a result of this feedback, I cleaned up my build environment variables and ./configure invocation, and now manual patching is NOT required to successfully build for iOS on arm64.
Just in case someone else on the internet runs into this problem, here is exactly what I did to produce my build:
unset _IOS_ __OSX__ _MINGW_ XCODE_DEFAULTROOT XCODE_DEVROOT XCODE_SDKROOT IPHONEOS_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PATH CFLAGS LDFLAGS CPPFLAGS CXXFLAGS CC LD CPP CXX CXXCPP AR AS NM RANLIB STRIP NASM
export _IOS_='1'
export XCODE_DEFAULTROOT='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain'
export XCODE_DEVROOT='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer'
export XCODE_SDKROOT='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk'
export PKG_CONFIG_PATH=''
export PKG_CONFIG_LIBDIR='/Users/alex/MacBuild/inde-ios-libs/lib/pkgconfig'
export PATH='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Users/alex/MacBuild/inde-ios-libs/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/alex/.local/bin:/Users/alex/bin'
export CFLAGS='-g -O2 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -miphoneos-version-min=5.1.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include -I/Users/alex/MacBuild/inde-ios-libs/include'
export LDFLAGS=' -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -miphoneos-version-min=5.1.1 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib -I/Users/alex/MacBuild/inde-ios-libs/lib'
export CXXFLAGS='-g -O2 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -miphoneos-version-min=5.1.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/include -I/Users/alex/MacBuild/inde-ios-libs/include'
export CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc'
export LD='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld'
export CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++'
export AR='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar'
export AS='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as'
export NM='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/nm'
export RANLIB='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib'
export STRIP='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip'
export NASM='/opt/local/bin/nasm'
./configure --host=aarch64-apple-darwiniphoneos --prefix=/Users/alex/MacBuild/inde-ios-libs --enable-shared=no --enable-static=yes
Note that anyone hoping to use that shell snippet will need to alter all of the paths to fit their unique environment. You can't just cut and paste or you'll be sorry.
Note also that this process just produces arm64 binaries, not lipo'd "fat" multi-architecture binaries. You need to do more scripting to accomplish that. (I have been working on exactly that kind of scripting, which is why you will see variables defined above that are not strictly necessary for freetype.)
Thanks again, and sorry for the unhelpful bug reports.
|