X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/5239f927984d11d52bf1faf0131450e050b56e01..01b1f62faeef23575f531b1083777e5662ba3952:/xcode.sh diff --git a/xcode.sh b/xcode.sh index 0fa5004..1ad0650 100755 --- a/xcode.sh +++ b/xcode.sh @@ -61,7 +61,7 @@ function configure() { cd build."${dir}" CC="${cc} ${flg}" CXX="${cxx} ${flg}" OBJCXX="${cxx} ${flg}" \ - ../configure "${flags[@]}" --prefix="/usr" "$@" + ../configure --enable-maintainer-mode "${flags[@]}" --prefix="/usr" "$@" cd .. } @@ -80,26 +80,36 @@ function build() { configure "${dir}" "${sdk}" "${flg}" "$@" --enable-static --with-pic } -for arch in i386; do - build "sim-${arch}" iphonesimulator "-arch ${arch} -mios-simulator-version-min=2.0" \ +for arch in i386 x86_64; do + build "sim-${arch}" iphonesimulator "-arch ${arch} -mios-simulator-version-min=4.0" \ OBJCXXFLAGS="-fobjc-abi-version=2 -fobjc-legacy-dispatch" \ CPPFLAGS="-I../libffi.${arch}/include" \ LDFLAGS="-L.." \ --disable-console done -for arch in armv6 armv7 armv7s; do - if [[ ${arch} == armv6 ]]; then - sdk=iphoneos5.1 - flg=() +for arch in armv6 armv7 armv7s arm64; do + cpf="-I../libffi.${arch}/include" + ldf="-L.." + + flg=() + if [[ ${arch} != armv6 ]]; then + flg+=(--disable-console) + else + flg+=(LTLIBAPR="../sysroot.ios/usr/lib/libapr-1.dylib") + flg+=(LTLIBGCC="-lgcc_s.1") + cpf+=" -mllvm -arm-reserve-r9" + cpf+=" -I../sysroot.ios/usr/include -I../sysroot.ios/usr/include/apr-1" + ldf+=" -L../sysroot.ios/usr/lib" + fi + + if [[ ${arch} == arm64 ]]; then + min=7.0 else - sdk=iphoneos - flg=(--disable-console) + min=2.0 + #cpf+=" -mthumb" fi - build "ios-${arch}" "${sdk}" "-arch ${arch} -miphoneos-version-min=2.0" --host=arm-apple-darwin10 \ - CPPFLAGS="-I../libffi.${arch}/include -I../sysroot.ios/usr/include -I../sysroot.ios/usr/include/apr-1" \ - LDFLAGS="-L.. -L../sysroot.ios/usr/lib" \ - LTLIBAPR="../sysroot.ios/usr/lib/libapr-1.dylib" \ - "${flg[@]}" + build "ios-${arch}" iphoneos "-arch ${arch} -miphoneos-version-min=${min}" --host=arm-apple-darwin10 \ + CPPFLAGS="${cpf}" LDFLAGS="${ldf}" "${flg[@]}" --host=arm-apple-darwin10 done