Merge pull request #7 from catloafsoft/master

Use the iphoneos-cross target in openssl
This commit is contained in:
Felix Schulze 2012-07-26 08:06:14 -07:00
commit af957c29f4
2 changed files with 16 additions and 10 deletions

View File

@ -70,16 +70,19 @@ do
PLATFORM="iPhoneOS" PLATFORM="iPhoneOS"
fi fi
export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk"
echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}" echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}"
echo "Please stand by..." echo "Please stand by..."
export CC="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/usr/bin/gcc -arch ${ARCH}" export CC="${CROSS_TOP}/usr/bin/gcc -arch ${ARCH}"
mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk"
LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log" LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log"
./Configure BSD-generic32 --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1 ./Configure iphoneos-cross --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1
# add -isysroot to CC= # add -isysroot to CC=
sed -ie "s!^CFLAG=!CFLAG=-isysroot ${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk !" "Makefile" sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} !" "Makefile"
make >> "${LOG}" 2>&1 make >> "${LOG}" 2>&1
make install >> "${LOG}" 2>&1 make install >> "${LOG}" 2>&1

View File

@ -2,6 +2,9 @@
/* WARNING: Generated automatically from opensslconf.h.in by Configure. */ /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
/* OpenSSL was configured with the following options: */ /* OpenSSL was configured with the following options: */
#ifndef OPENSSL_SYSNAME_iOS
# define OPENSSL_SYSNAME_iOS
#endif
#ifndef OPENSSL_DOING_MAKEDEPEND #ifndef OPENSSL_DOING_MAKEDEPEND
@ -83,8 +86,8 @@
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
#define ENGINESDIR "/data/home/fschulze/dev/ios/OpenSSL-for-iPhone/bin/iPhoneSimulator5.1-i386.sdk/lib/engines" #define ENGINESDIR "/Users/megastep/src/OpenSSL-for-iPhone/bin/iPhoneSimulator5.1-i386.sdk/lib/engines"
#define OPENSSLDIR "/data/home/fschulze/dev/ios/OpenSSL-for-iPhone/bin/iPhoneSimulator5.1-i386.sdk" #define OPENSSLDIR "/Users/megastep/src/OpenSSL-for-iPhone/bin/iPhoneSimulator5.1-i386.sdk"
#endif #endif
#endif #endif
@ -115,14 +118,14 @@
* - Intel P6 because partial register stalls are very expensive; * - Intel P6 because partial register stalls are very expensive;
* - elder Alpha because it lacks byte load/store instructions; * - elder Alpha because it lacks byte load/store instructions;
*/ */
#define RC4_INT unsigned int #define RC4_INT unsigned char
#endif #endif
#if !defined(RC4_CHUNK) #if !defined(RC4_CHUNK)
/* /*
* This enables code handling data aligned at natural CPU word * This enables code handling data aligned at natural CPU word
* boundary. See crypto/rc4/rc4_enc.c for further details. * boundary. See crypto/rc4/rc4_enc.c for further details.
*/ */
#undef RC4_CHUNK #define RC4_CHUNK unsigned long
#endif #endif
#endif #endif
@ -130,7 +133,7 @@
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
* %20 speed up (longs are 8 bytes, int's are 4). */ * %20 speed up (longs are 8 bytes, int's are 4). */
#ifndef DES_LONG #ifndef DES_LONG
#define DES_LONG unsigned int #define DES_LONG unsigned long
#endif #endif
#endif #endif
@ -150,12 +153,12 @@
#define CONFIG_HEADER_RC4_LOCL_H #define CONFIG_HEADER_RC4_LOCL_H
/* if this is defined data[i] is used instead of *data, this is a %20 /* if this is defined data[i] is used instead of *data, this is a %20
* speedup on x86 */ * speedup on x86 */
#define RC4_INDEX #undef RC4_INDEX
#endif #endif
#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
#define CONFIG_HEADER_BF_LOCL_H #define CONFIG_HEADER_BF_LOCL_H
#undef BF_PTR #define BF_PTR
#endif /* HEADER_BF_LOCL_H */ #endif /* HEADER_BF_LOCL_H */
#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)