From 0b3e142ccae3c9e1d17167462c38368b4d6820f8 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Mon, 31 Oct 2011 18:37:00 +0000 Subject: [PATCH] detect llvm-gcc in newer iOS SDKs and use gcc 4.2 --- config-cydia.sh | 2 +- configure.in | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config-cydia.sh b/config-cydia.sh index 0d6460dde..9d11313ea 100755 --- a/config-cydia.sh +++ b/config-cydia.sh @@ -1 +1 @@ -./configure --target=iphone --enable-launchd --enable-ldid --with-prefsbundle --with-uart-speed=921600 \ No newline at end of file +./configure --target=iphone --enable-launchd --enable-ldid --with-prefsbundle --with-uart-speed=921600 --with-gcc-version=4.2 \ No newline at end of file diff --git a/configure.in b/configure.in index 35f9fbeff..052cdd65c 100644 --- a/configure.in +++ b/configure.in @@ -98,6 +98,11 @@ if test "x$target" = xiphone; then if test -e "$DEVELOPER_PATH/usr/bin/arm-apple-darwin10-gcc-$GCC_VERSION"; then darwin_v='10' fi + # Set up check for even newer compiler: + if test -e "$DEVELOPER_PATH/usr/bin/arm-apple-darwin10-llvm-gcc-$GCC_VERSION"; then + compiler_prefix='-llvm' + darwin_v='10' + fi REMOTE_DEVICE_DB_SOURCES="remote_device_db_iphone.m" REMOTE_DEVICE_DB="remote_device_db_iphone" @@ -111,8 +116,8 @@ if test "x$target" = xiphone; then echo "SDK path: $SDK_PATH" echo "iPhone IP for install-iphone target: $IPHONE_IP" - CC="$DEVELOPER_PATH/usr/bin/arm-apple-darwin$darwin_v-gcc-$GCC_VERSION" - OBJC="$DEVELOPER_PATH/usr/bin/arm-apple-darwin$darwin_v-g++-$GCC_VERSION" + CC="$DEVELOPER_PATH/usr/bin/arm-apple-darwin$darwin_v$compiler_prefix-gcc-$GCC_VERSION" + OBJC="$DEVELOPER_PATH/usr/bin/arm-apple-darwin$darwin_v$compiler_prefix-g++-$GCC_VERSION" CFLAGS="$CFLAGS -g" CPPFLAGS="$CPPFLAGS -isysroot $SDK_PATH" LDFLAGS="$LDFLAGS -framework Foundation -framework CoreFoundation -framework UIKit -lobjc" @@ -176,7 +181,7 @@ else case "$host_os" in darwin*) # on Mac, create universal - helps to build 32-bit iPhone Simulator apps on 64-bit machines - LDFLAGS="$LDFLAGS -arch ppc -arch i386 -arch x86_64 -framework CoreFoundation" + LDFLAGS="$LDFLAGS -framework CoreFoundation" ;; esac USE_LDID="#" @@ -198,7 +203,7 @@ AM_CONDITIONAL(USE_PREFSBUNDLE, [test "x$USE_PREFSBUNDLE" == "xyes"]) # summary -# echo "CFLAGS: $CFLAGS" +echo "CC: $CC" echo "CPPFLAGS: $CPPFLAGS" echo "LDFLAGS: $LDFLAGS"