From 44b8ca7ff28be1b9beb632d0c9eb58c5caad93c5 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Mon, 25 Feb 2013 14:10:01 +0100 Subject: [PATCH 4/5] configure: add support for iOS 6 --- build/make/configure.sh | 62 +++++++++++++++++++++++++++++++++++++++++++------ configure | 3 +++ 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/build/make/configure.sh b/build/make/configure.sh index d4ab231..3bd5618 100755 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -641,6 +641,9 @@ process_common_toolchain() { tgt_isa=x86_64 tgt_os=darwin12 ;; + *ios6*) + tgt_os=ios6 + ;; *mingw32*|*cygwin*) [ -z "$tgt_isa" ] && tgt_isa=x86 tgt_os=win32 @@ -707,19 +710,40 @@ process_common_toolchain() { fi done fi + if [ -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" ]; then + osx_sdk_dir="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" + fi + if [ -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" ]; then + osx_sdk_dir="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" + fi ;; + *-ios*) + case "$tgt_isa" in + arm*) + IOS_PLATFORM="iPhoneOS" + ;; + x86*) + IOS_PLATFORM="iPhoneSimulator" + ;; + esac + if [ -z "${sdk_path}" ]; then + SDK_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM}.platform/Developer" + else + SDK_PATH=${sdk_path} + fi + IOS_SDK_ROOT="${SDK_PATH}/SDKs" + IOS_SDK_VERSIONS="6.0 6.1" + for v in ${IOS_SDK_VERSIONS}; do + if [ -d "${IOS_SDK_ROOT}/${IOS_PLATFORM}${v}.sdk" ]; then + osx_sdk_dir="${IOS_SDK_ROOT}/${IOS_PLATFORM}${v}.sdk" + fi + done esac if [ -d "${osx_sdk_dir}" ]; then add_cflags "-isysroot ${osx_sdk_dir}" add_ldflags "-isysroot ${osx_sdk_dir}" fi - if [ -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" ]; then - osx_sdk_dir="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" - fi - if [ -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" ]; then - osx_sdk_dir="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" - fi case ${toolchain} in *-darwin8-*) @@ -742,6 +766,10 @@ process_common_toolchain() { add_cflags "-mmacosx-version-min=10.8" add_ldflags "-mmacosx-version-min=10.8" ;; + *-ios6-*) + add_cflags "-miphoneos-version-min=6.0" + add_ldflags "-miphoneos-version-min=6.0" + ;; esac # Handle Solaris variants. Solaris 10 needs -lposix4 @@ -931,6 +959,26 @@ process_common_toolchain() { asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl" ;; + ios*) + TOOLCHAIN_PATH=${SDK_PATH}/usr/bin + CC=${TOOLCHAIN_PATH}/llvm-gcc-4.2 + AR=${TOOLCHAIN_PATH}/ar + LD=${TOOLCHAIN_PATH}/llvm-gcc-4.2 + AS=${TOOLCHAIN_PATH}/as + STRIP=${TOOLCHAIN_PATH}/strip + NM=${TOOLCHAIN_PATH}/nm + AS_SFX=.s + + # ASFLAGS is written here instead of using check_add_asflags + # because we need to overwrite all of ASFLAGS and purge the + # options that were put in above + ASFLAGS="-version -arch ${tgt_isa} -g" + + add_cflags -arch ${tgt_isa} + add_ldflags -arch ${tgt_isa} + + asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl" + ;; linux*) enable linux @@ -1087,7 +1135,7 @@ EOF enabled debug && [ "${AS}" = nasm ] && add_asflags -g [ "${AS##*/}" = nasm ] && check_asm_align ;; - darwin*) + darwin*|ios*) add_asflags -f macho${bits} enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x86_64" add_cflags ${darwin_arch} diff --git a/configure b/configure index f5cc9bc..d219584 100755 --- a/configure +++ b/configure @@ -92,11 +92,13 @@ all_platforms="${all_platforms} armv6-darwin-gcc" all_platforms="${all_platforms} armv6-linux-rvct" all_platforms="${all_platforms} armv6-linux-gcc" all_platforms="${all_platforms} armv6-none-rvct" +all_platforms="${all_platforms} armv6-ios6-gcc" all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8 all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8 all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8 all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8 all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8 +all_platforms="${all_platforms} armv7-ios6-gcc" #neon Cortex-A8 all_platforms="${all_platforms} mips32-linux-gcc" all_platforms="${all_platforms} ppc32-darwin8-gcc" all_platforms="${all_platforms} ppc32-darwin9-gcc" @@ -113,6 +115,7 @@ all_platforms="${all_platforms} x86-darwin9-icc" all_platforms="${all_platforms} x86-darwin10-gcc" all_platforms="${all_platforms} x86-darwin11-gcc" all_platforms="${all_platforms} x86-darwin12-gcc" +all_platforms="${all_platforms} x86-ios6-gcc" all_platforms="${all_platforms} x86-linux-gcc" all_platforms="${all_platforms} x86-linux-icc" all_platforms="${all_platforms} x86-os2-gcc" -- 1.8.3.1