diff options
author | George Nachman <georgen@google.com> | 2014-07-15 16:43:01 -0700 |
---|---|---|
committer | George Nachman <georgen@google.com> | 2014-07-15 16:43:01 -0700 |
commit | 75a1a0c4f7a3105b061de787be0c257544d20ffd (patch) | |
tree | 74a96dc322d9d785fa0614dc27a006c201f8a5c6 /scripts | |
parent | a03a49cf55e0e01482f89a171bdf73a1e200a1a6 (diff) |
Fix iOS 8 support and use libc++ instead of libstdc++
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-mailcore2-ios.sh | 6 | ||||
-rwxr-xr-x | scripts/prepare-ctemplate-ios.sh | 14 | ||||
-rwxr-xr-x | scripts/prepare-icu4c-ios.sh | 20 |
3 files changed, 18 insertions, 22 deletions
diff --git a/scripts/build-mailcore2-ios.sh b/scripts/build-mailcore2-ios.sh index 77b2bf46..e04755b3 100755 --- a/scripts/build-mailcore2-ios.sh +++ b/scripts/build-mailcore2-ios.sh @@ -6,12 +6,6 @@ if xcodebuild -showsdks|grep iphoneos6.1 >/dev/null ; then elif xcodebuild -showsdks|grep iphoneos7.0 >/dev/null ; then sdkversion=7.0 devicearchs="armv7 armv7s arm64" -elif xcodebuild -showsdks|grep iphoneos7.1 >/dev/null ; then - sdkversion=7.1 - devicearchs="armv7 armv7s arm64" -elif xcodebuild -showsdks|grep iphoneos8.0 >/dev/null ; then - sdkversion=8.0 - devicearchs="armv7 armv7s arm64" else echo SDK not found exit 1 diff --git a/scripts/prepare-ctemplate-ios.sh b/scripts/prepare-ctemplate-ios.sh index 3b6c0e0b..05027382 100755 --- a/scripts/prepare-ctemplate-ios.sh +++ b/scripts/prepare-ctemplate-ios.sh @@ -71,12 +71,12 @@ cp -R "$builddir/downloads/ctemplate" "$srcdir/ctemplate" echo building ctemplate cd "$srcdir/ctemplate" -TOOLCHAIN=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +TOOLCHAIN=`xcode-select -p`/Toolchains/XcodeDefault.xctoolchain/usr/bin export CC=$TOOLCHAIN/clang export CXX=$TOOLCHAIN/clang++ sdk="iphoneos$sdkversion" -sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$sdkversion.sdk" +sysroot="`xcode-select -p`/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$sdkversion.sdk" ARCH=arm for MARCH in $MARCHS; do @@ -84,8 +84,8 @@ for MARCH in $MARCHS; do echo "$logdir/ctemplate-build.log" export CPPFLAGS="-arch ${MARCH} -isysroot $sysroot -miphoneos-version-min=$sdkversion" export CFLAGS="$CPPFLAGS" - export CXXFLAGS="$CFLAGS -stdlib=libstdc++ -std=gnu++11" - export LDFLAGS="-lstdc++ -stdlib=libstdc++" + export CXXFLAGS="$CFLAGS -stdlib=libc++" + export LDFLAGS="-lstdc++ -stdlib=libc++" ./configure --host=${ARCH} --disable-shared --disable-dependency-tracking >> "$logdir/ctemplate-build.log" make >> "$logdir/ctemplate-build.log" @@ -105,7 +105,7 @@ for MARCH in $MARCHS; do done sdk="iphonesimulator$sdkversion" -sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$sdkversion.sdk" +sysroot="`xcode-select -p`/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$sdkversion.sdk" ARCH=i386 MARCHS="i386 x86_64" @@ -115,8 +115,8 @@ for MARCH in $MARCHS; do echo "$logdir/ctemplate-build.log" export CPPFLAGS="-arch ${MARCH} -isysroot $sysroot -miphoneos-version-min=$sdkversion" export CFLAGS="$CPPFLAGS" - export CXXFLAGS="$CFLAGS -stdlib=libstdc++ -std=gnu++11" - export LDFLAGS="-lstdc++ -stdlib=libstdc++" + export CXXFLAGS="$CFLAGS -stdlib=libc++" + export LDFLAGS="-lstdc++ -stdlib=libc++" ./configure --host=${MARCH} --disable-shared --disable-dependency-tracking >> "$logdir/ctemplate-build.log" make >> "$logdir/ctemplate-build.log" diff --git a/scripts/prepare-icu4c-ios.sh b/scripts/prepare-icu4c-ios.sh index f214399b..33e00bcf 100755 --- a/scripts/prepare-icu4c-ios.sh +++ b/scripts/prepare-icu4c-ios.sh @@ -22,7 +22,7 @@ version='51_1' build_version="$version~2" url="http://download.icu-project.org/files/icu4c/$versionfolder/icu4c-$version-src.tgz" package_filename="icu4c-$version-src.tgz" -sysrootpath="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" +sysrootpath="`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" enable_icu_data=0 pushd `dirname $0` > /dev/null @@ -77,10 +77,10 @@ cd icu patch -p1 < "$scriptpath/icu4c-ios.patch" cd .. -TOOLCHAIN=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +TOOLCHAIN=`xcode-select -p`/Toolchains/XcodeDefault.xctoolchain/usr/bin export CC=$TOOLCHAIN/clang export CXX=$TOOLCHAIN/clang++ -export SYSROOTPATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" +export SYSROOTPATH="`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" export CPPFLAGS="-isysroot $SYSROOTPATH" export CFLAGS="$CPPFLAGS" export LDLAGS="-lc++ -isysroot $SYSROOTPATH" @@ -100,20 +100,22 @@ if xcodebuild -showsdks|grep iphoneos7.0 >/dev/null ; then MARCHS="armv7 armv7s arm64" elif xcodebuild -showsdks|grep iphoneos6.1 >/dev/null ; then MARCHS="armv7 armv7s" +elif xcodebuild -showsdks|grep iphoneos8.0 >/dev/null ; then + MARCHS="armv7 armv7s arm64" else echo SDK not found exit 1 fi iphonesdk="iphoneos$sdkversion" -sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$sdkversion.sdk" +sysroot="`xcode-select -p`/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$sdkversion.sdk" cd "$srcdir/icu/source" for MARCH in $MARCHS; do export CPPFLAGS="-arch ${MARCH} -isysroot ${sysroot} -DUCONFIG_NO_FILE_IO=1 -miphoneos-version-min=$sdkversion" export CFLAGS="$CPPFLAGS" - export CXXFLAGS="$CFLAGS -stdlib=libstdc++ -std=gnu++11" - export LDFLAGS="-lstdc++ -stdlib=libstdc++ -isysroot ${sysroot}" + export CXXFLAGS="$CFLAGS -stdlib=libc++ -std=gnu++11" + export LDFLAGS="-lstdc++ -stdlib=libc++ -isysroot ${sysroot}" echo building $MARCH @@ -129,7 +131,7 @@ for MARCH in $MARCHS; do done sdk="iphonesimulator$sdkversion" -sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$sdkversion.sdk" +sysroot="`xcode-select -p`/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$sdkversion.sdk" ARCH=i386 MARCHS="x86_64 i386" @@ -138,8 +140,8 @@ cd "$srcdir/icu/source" for MARCH in $MARCHS; do export CPPFLAGS="-arch ${MARCH} -isysroot ${sysroot} -DUCONFIG_NO_FILE_IO=1 -miphoneos-version-min=$sdkversion" export CFLAGS="$CPPFLAGS" - export CXXFLAGS="$CFLAGS -stdlib=libstdc++ -std=gnu++11" - export LDFLAGS="-lstdc++ -stdlib=libstdc++" + export CXXFLAGS="$CFLAGS -stdlib=libc++ -std=gnu++11" + export LDFLAGS="-lstdc++ -stdlib=libc++" echo building $MARCH |