Thanks to armando.dicianno for the patch Fixes issue #603
Unified · Split
| @@ -925,41 +925,26 @@ EOF · 924 unmodified lines | |||
| 925 | ;; | 925 | ;; |
| 926 | 926 | ||
| 927 | darwin*) | 927 | darwin*) |
| 928 | if [ -z "${sdk_path}" ]; then | 928 | |
| 929 | SDK_PATH=`xcode-select -print-path 2> /dev/null` | 929 | XCRUN_FIND="xcrun --sdk iphoneos -find" |
| 930 | SDK_PATH=${SDK_PATH}/Platforms/iPhoneOS.platform/Developer | 930 | CXX="$(${XCRUN_FIND} clang++)" |
| 931 | else | 931 | CC="$(${XCRUN_FIND} clang)" |
| 932 | SDK_PATH=${sdk_path} | 932 | AR="$(${XCRUN_FIND} ar)" |
| 933 | fi | 933 | LD="$(${XCRUN_FIND} ld)" |
| 934 | TOOLCHAIN_PATH=${SDK_PATH}/usr/bin | 934 | AS="$(${XCRUN_FIND} as)" |
| 935 | CXX=${TOOLCHAIN_PATH}/g++ | 935 | STRIP="$(${XCRUN_FIND} strip)" |
| 936 | CC=${TOOLCHAIN_PATH}/gcc | 936 | NM="$(${XCRUN_FIND} nm)" |
| 937 | AR=${TOOLCHAIN_PATH}/ar | 937 | RANLIB="$(${XCRUN_FIND} ranlib)" |
| 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 | ||
| 942 | AS_SFX=.s | 938 | AS_SFX=.s |
| 943 | 939 | ||
| 944 | # ASFLAGS is written here instead of using check_add_asflags | 940 | # ASFLAGS is written here instead of using check_add_asflags |
| 945 | # because we need to overwrite all of ASFLAGS and purge the | 941 | # because we need to overwrite all of ASFLAGS and purge the |
| 946 | # options that were put in above | 942 | # options that were put in above |
| 947 | ASFLAGS="-version -arch ${tgt_isa} -g" | 943 | ASFLAGS="-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}" | ||
| 957 | 944 | ||
| 958 | # Add the paths for the alternate libc | 945 | alt_libc="$(xcrun --sdk iphoneos --show-sdk-path)" |
| 959 | for d in usr/include; do | 946 | add_cflags -arch ${tgt_isa} -isysroot ${alt_libc} |
| 960 | try_dir="${alt_libc}/${d}" | 947 | add_ldflags -arch ${tgt_isa} -ios_version_min 7.0 |
| 961 | [ -d "${try_dir}" ] && add_cflags -I"${try_dir}" | ||
| 962 | done | ||
| 963 | 948 | ||
| 964 | for d in lib usr/lib usr/lib/system; do | 949 | for d in lib usr/lib usr/lib/system; do |
| 965 | try_dir="${alt_libc}/${d}" | 950 | try_dir="${alt_libc}/${d}" |
| @@ -26,7 +26,7 @@ Advanced options: · 25 unmodified lines | |||
| 26 | ${toggle_unit_tests} unit tests | 26 | ${toggle_unit_tests} unit tests |
| 27 | --libc=PATH path to alternate libc | 27 | --libc=PATH path to alternate libc |
| 28 | --as={yasm|nasm|auto} use specified assembler [auto, yasm preferred] | 28 | --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) |
| 30 | ${toggle_fast_unaligned} don't use unaligned accesses, even when | 30 | ${toggle_fast_unaligned} don't use unaligned accesses, even when |
| 31 | supported by hardware [auto] | 31 | supported by hardware [auto] |
| 32 | ${toggle_codec_srcs} in/exclude codec library source code | 32 | ${toggle_codec_srcs} in/exclude codec library source code |