Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix libgcrypt build error with iOS 5.0 SDK

fixes 5
  • Loading branch information...
commit b33bac3821675b70fb42397e5bf088e09dc441cf 1 parent 830c1bd
@x2on authored
Showing with 24 additions and 7 deletions.
  1. +13 −0 armasm.diff
  2. +11 −7 build-libgcrypt.sh
View
13 armasm.diff
@@ -0,0 +1,13 @@
+--- mpi/longlong.h 2005-07-29 13:31:17.000000000 +0000
++++ mpi/longlong.h 2008-01-01 11:09:27.000000000 +0000
+@@ -225,8 +225,8 @@
+ : "r0", "r1", "r2")
+ #else
+ #define umul_ppmm(xh, xl, a, b) \
+- __asm__ ("%@ Inlined umul_ppmm\n" \
+- "umull %r1, %r0, %r2, %r3" \
++ __asm__ ("@ Inlined umul_ppmm\n" \
++ "umull %1, %0, %2, %3" \
+ : "=&r" ((USItype)(xh)), \
+ "=r" ((USItype)(xl)) \
+ : "r" ((USItype)(a)), \
View
18 build-libgcrypt.sh
@@ -22,7 +22,7 @@
# Change values here
#
VERSION="1.4.6"
-SDKVERSION="4.3"
+SDKVERSION="5.0"
#
###########################################################################
#
@@ -64,26 +64,30 @@ do
echo "Please stand by..."
tar zxf libgcrypt-${VERSION}.tar.gz -C src
cd src/libgcrypt-${VERSION}
+
+ mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk"
+ LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-libgcrypt-${VERSION}.log"
+
+ echo "Patching libgcrypt to compile with iOS-SDK..."
+ echo "@see http://www.telesphoreo.org/browser/trunk/data/gcrypt/armasm.diff"
+ patch -p0 < ../../armasm.diff >> "${LOG}" 2>&1
+ echo "Patching done."
export DEVROOT="/Developer/Platforms/${PLATFORM}.platform/Developer"
export SDKROOT="${DEVROOT}/SDKs/${PLATFORM}${SDKVERSION}.sdk"
export CC=${DEVROOT}/usr/bin/gcc
export LD=${DEVROOT}/usr/bin/ld
- export CPP=${DEVROOT}/usr/bin/cpp
+ export CPP=${DEVROOT}/usr/bin/llvm-cpp-4.2
export CXX=${DEVROOT}/usr/bin/g++
export AR=${DEVROOT}/usr/bin/ar
export AS=${DEVROOT}/usr/bin/as
export NM=${DEVROOT}/usr/bin/nm
- export CXXCPP=$DEVROOT/usr/bin/cpp
+ export CXXCPP=$DEVROOT/usr/bin/llvm-cpp-4.2
export RANLIB=$DEVROOT/usr/bin/ranlib
export LDFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT} -L${CURRENTPATH}/lib"
export CFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT} -I${CURRENTPATH}/include"
export CXXFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${SDKROOT} -I${CURRENTPATH}/include"
- mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk"
-
- LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-libgcrypt-${VERSION}.log"
-
./configure --host=${ARCH}-apple-darwin --prefix="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" --disable-shared --enable-static --with-gpg-error-prefix="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" >> "${LOG}" 2>&1
make >> "${LOG}" 2>&1
Please sign in to comment.
Something went wrong with that request. Please try again.