]> git.saurik.com Git - cycript.git/blobdiff - xcode.sh
Correct "error: taking address of temporary array".
[cycript.git] / xcode.sh
index 55f6505a8897c53545180f4604ad1402c35ba9ef..fc5e8b969d51859b60bb3fedb7c31c43f999db8c 100755 (executable)
--- a/xcode.sh
+++ b/xcode.sh
@@ -66,11 +66,6 @@ function configure() {
     cd ..
 }
 
-for arch in i386 x86_64; do
-    configure "mac-${arch}" "${mac}" "-arch ${arch} -mmacosx-version-min=10.6" \
-        CPPFLAGS="-I../readline" LDFLAGS="-L../readline"
-done
-
 function build() {
     local dir=$1
     local sdk=$2
@@ -80,6 +75,11 @@ function build() {
     configure "${dir}" "${sdk}" "${flg}" "$@" --enable-static --with-pic
 }
 
+for arch in i386 x86_64; do
+    build "osx-${arch}" "${mac}" "-arch ${arch} -mmacosx-version-min=10.6" \
+        CPPFLAGS="-I../readline" LDFLAGS="-L../readline"
+done
+
 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" \
@@ -97,11 +97,20 @@ for arch in armv6 armv7 armv7s arm64; do
         flg+=(--disable-console)
     else
         flg+=(LTLIBAPR="../sysroot.ios/usr/lib/libapr-1.dylib")
-        flg+=(LTLIBGCC="-lgcc_s.1") #-L${xcs}/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/arm-apple-darwin10/4.2.1/v6 -lgcc_eh")
+        flg+=(LTLIBGCC="-lgcc_s.1")
+        cpf+=" -include ${PWD}/xcode.h"
+        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
 
-    build "ios-${arch}" iphoneos "-arch ${arch} -miphoneos-version-min=2.0" --host=arm-apple-darwin10 \
+    if [[ ${arch} == arm64 ]]; then
+        min=7.0
+    else
+        min=2.0
+        #cpf+=" -mthumb"
+    fi
+
+    build "ios-${arch}" iphoneos "-arch ${arch} -miphoneos-version-min=${min}" --host=arm-apple-darwin10 \
         CPPFLAGS="${cpf}" LDFLAGS="${ldf}" "${flg[@]}" --host=arm-apple-darwin10
 done