From bb25a72881db6d3a67d9cdd46bb0d1bd059e322b Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 7 Nov 2011 13:16:55 +0000 Subject: [PATCH] MacOS and iOS support --- Configure | 7 +++++++ config | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/Configure b/Configure index 10ef8cd115..594e7bedc6 100755 --- 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 d2b155aa44..08d83735ec 100755 --- 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 -- 2.25.1