MacOS and iOS support
authorDr. Stephen Henson <steve@openssl.org>
Mon, 7 Nov 2011 13:16:55 +0000 (13:16 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 7 Nov 2011 13:16:55 +0000 (13:16 +0000)
Configure
config

index 10ef8cd115cf6c02b6298f8f3c56f4eea57ccad9..594e7bedc6812e37825d835dbe9a43361cd418e0 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -577,8 +577,15 @@ my %table=(
 "darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 "debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 "darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+"darwin-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 "debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 
+##### iOS setup
+"darwin-iphoneos-armv7-cross","llvm-gcc:-O3 -arch armv7 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -miphoneos-version-min=4.0 -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+"darwin-iphoneos-armv6-cross","llvm-gcc:-O3 -arch armv6 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -miphoneos-version-min=4.0 -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+"darwin-iphoneos-cross","llvm-gcc:-O3 -arch armv7 -arch armv6 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -miphoneos-version-min=4.0 -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+"darwin-iphonesimulator-cross","llvm-gcc:-O3 -arch i386 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -miphoneos-version-min=4.0 -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+
 ##### A/UX
 "aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 
diff --git a/config b/config
index d2b155aa44c1fb343c33635d9edaa49907a16686..08d83735ec4c4ef3e54b0e5c213762c9db68446a 100755 (executable)
--- a/config
+++ b/config
@@ -277,6 +277,9 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
            Power*)
                echo "ppc-apple-darwin${VERSION}"
                ;;
+            x86_64)
+               echo "x86_64-apple-darwin${VERSION}"
+               ;;
            *)
                echo "i686-apple-darwin${VERSION}"
                ;;
@@ -547,6 +550,8 @@ case "$GUESSOS" in
            fi
        fi
        OUT="darwin-ppc-cc" ;;
+  x86_64-*-darwin*) OUT="darwin-x86_64-cc" ;;
+  i386-whatever-darwin) OUT="darwin-i386-cc" ;;
   i?86-apple-darwin*)
        ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null`
        if [ "$ISA64" = "1" ]; then
@@ -825,6 +830,7 @@ case "$GUESSOS" in
   *-*-qnx6) OUT="QNX6" ;;
   x86-*-android|i?86-*-android) OUT="android-x86" ;;
   armv[7-9]*-*-android) OUT="android-armv7" ;;
+  darwin-whatever-*) OUT=`echo $GUESSOS | sed -e 's/-whatever//'`;;
   *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
 esac