From 05ea6336367f18495f257c6854fea18265562446 Mon Sep 17 00:00:00 2001 From: Michael Wermeester Date: Sun, 22 Sep 2013 19:25:42 +0200 Subject: [PATCH] - Add arm64 architecture support. - Change base SDK to iOS 7.0. --- build-libssl.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build-libssl.sh b/build-libssl.sh index 0351809..24436bd 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -22,7 +22,7 @@ # Change values here # # # VERSION="1.0.1e" # -SDKVERSION="6.1" # +SDKVERSION="7.0" # # # ########################################################################### # # @@ -32,7 +32,7 @@ SDKVERSION="6.1" # CURRENTPATH=`pwd` -ARCHS="i386 armv7 armv7s" +ARCHS="i386 armv7 armv7s arm64" DEVELOPER=`xcode-select -print-path` if [ ! -d "$DEVELOPER" ]; then @@ -72,11 +72,12 @@ do export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer" export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk" + export BUILD_TOOLS="${DEVELOPER}" echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}" echo "Please stand by..." - export CC="${CROSS_TOP}/usr/bin/gcc -arch ${ARCH}" + export CC="${BUILD_TOOLS}/usr/bin/gcc -arch ${ARCH}" mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log" @@ -87,7 +88,7 @@ do fi # add -isysroot to CC= - sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} !" "Makefile" + sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/Platforms/${PLATFORM}.platform/Developer/SDKs/${CROSS_SDK} -miphoneos-version-min=7.0 !" "Makefile" make >> "${LOG}" 2>&1 make install >> "${LOG}" 2>&1 @@ -95,9 +96,9 @@ do done echo "Build library..." -lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libssl.a -output ${CURRENTPATH}/lib/libssl.a +lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/lib/libssl.a -output ${CURRENTPATH}/lib/libssl.a -lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libcrypto.a -output ${CURRENTPATH}/lib/libcrypto.a +lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/libcrypto.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/lib/libcrypto.a -output ${CURRENTPATH}/lib/libcrypto.a mkdir -p ${CURRENTPATH}/include cp -R ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/include/openssl ${CURRENTPATH}/include/