X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/8c0927fb9c0806a72f787373bad815716a0c8b4c..13c7f2fb8fc0619c8da1b5c8a697f7894479b070:/libffi.sh?ds=sidebyside diff --git a/libffi.sh b/libffi.sh index 9d887df..fa01534 100755 --- a/libffi.sh +++ b/libffi.sh @@ -38,15 +38,24 @@ function arch() { archs+=("${arch}") mkdir "libffi.${arch}" - flags="-isysroot ${isysroot} -m${os}-version-min=${min}" + flags=() + flags+=(-isysroot "${isysroot}") + flags+=(-m${os}-version-min="${min}") + flags+=(-no-integrated-as) + flags+=(-fno-stack-protector) + flags+=(-O3 -g3) + + if [[ ${arch} == arm* && ${arch} != arm64 ]]; then + flags+=(-mthumb) + fi cd "libffi.${arch}" - CC="clang -arch ${arch}" CFLAGS="-no-integrated-as ${flags}" CPPFLAGS="${flags}" ../libffi/configure --host="${host}" + CC="clang -arch ${arch}" CFLAGS="${flags[*]}" CPPFLAGS="${flags[*]} $*" ../libffi/configure --host="${host}" make cd .. } -arch armv6 arm-apple-darwin10 iphoneos iphoneos 2.0 +arch armv6 arm-apple-darwin10 iphoneos iphoneos 2.0 -mllvm -arm-reserve-r9 arch armv7 arm-apple-darwin10 iphoneos iphoneos 2.0 arch armv7s arm-apple-darwin10 iphoneos iphoneos 2.0 arch arm64 aarch64-apple-darwin11 iphoneos iphoneos 2.0