History

Build iOS targets with XCode 5

Thanks to armando.dicianno for the patch Fixes issue #603

Johann committed 13 years ago

Commit 5d0c33b1 parent ffb17e22 files · +15 −30Browse files

Unified · Split

2 files
  1. build/make/configure.sh +14 −29
  2. configure +1 −1
build/make/configure.sh+14−29
@@ -925,41 +925,26 @@ EOF · 924 unmodified lines
925925 ;;
926926
927927 darwin*)
928− if [ -z "${sdk_path}" ]; then
929− SDK_PATH=`xcode-select -print-path 2> /dev/null`
930− SDK_PATH=${SDK_PATH}/Platforms/iPhoneOS.platform/Developer
931− else
932− SDK_PATH=${sdk_path}
933− fi
934− TOOLCHAIN_PATH=${SDK_PATH}/usr/bin
935− CXX=${TOOLCHAIN_PATH}/g++
936− CC=${TOOLCHAIN_PATH}/gcc
937− AR=${TOOLCHAIN_PATH}/ar
938− LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2
939− AS=${TOOLCHAIN_PATH}/as
940− STRIP=${TOOLCHAIN_PATH}/strip
941− NM=${TOOLCHAIN_PATH}/nm
928+
929+ XCRUN_FIND="xcrun --sdk iphoneos -find"
930+ CXX="$(${XCRUN_FIND} clang++)"
931+ CC="$(${XCRUN_FIND} clang)"
932+ AR="$(${XCRUN_FIND} ar)"
933+ LD="$(${XCRUN_FIND} ld)"
934+ AS="$(${XCRUN_FIND} as)"
935+ STRIP="$(${XCRUN_FIND} strip)"
936+ NM="$(${XCRUN_FIND} nm)"
937+ RANLIB="$(${XCRUN_FIND} ranlib)"
942938 AS_SFX=.s
943939
944940 # ASFLAGS is written here instead of using check_add_asflags
945941 # because we need to overwrite all of ASFLAGS and purge the
946942 # options that were put in above
947− ASFLAGS="-version -arch ${tgt_isa} -g"
948−
949− add_cflags -arch ${tgt_isa}
950− add_ldflags -arch_only ${tgt_isa}
951−
952− if [ -z "${alt_libc}" ]; then
953− alt_libc=${SDK_PATH}/SDKs/iPhoneOS6.0.sdk
954− fi
955−
956− add_cflags "-isysroot ${alt_libc}"
943+ ASFLAGS="-arch ${tgt_isa} -g"
957944
958− # Add the paths for the alternate libc
959− for d in usr/include; do
960− try_dir="${alt_libc}/${d}"
961− [ -d "${try_dir}" ] && add_cflags -I"${try_dir}"
962− done
945+ alt_libc="$(xcrun --sdk iphoneos --show-sdk-path)"
946+ add_cflags -arch ${tgt_isa} -isysroot ${alt_libc}
947+ add_ldflags -arch ${tgt_isa} -ios_version_min 7.0
963948
964949 for d in lib usr/lib usr/lib/system; do
965950 try_dir="${alt_libc}/${d}"
configure+1−1
@@ -26,7 +26,7 @@ Advanced options: · 25 unmodified lines
2626 ${toggle_unit_tests} unit tests
2727 --libc=PATH path to alternate libc
2828 --as={yasm|nasm|auto} use specified assembler [auto, yasm preferred]
29− --sdk-path=PATH path to root of sdk (iOS, android builds only)
29+ --sdk-path=PATH path to root of sdk (android builds only)
3030 ${toggle_fast_unaligned} don't use unaligned accesses, even when
3131 supported by hardware [auto]
3232 ${toggle_codec_srcs} in/exclude codec library source code

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t