diff --git a/Configure b/Configure index cf1859b600..e2d98f1cbd 100755 --- a/Configure +++ b/Configure @@ -119,6 +119,7 @@ my $bits2="SIXTY_FOUR_BIT "; my $x86_elf_asm="x86cpuid-elf.o:bn86-elf.o co86-elf.o mo86-elf.o:dx86-elf.o yx86-elf.o:ax86-elf.o:bx86-elf.o:mx86-elf.o:sx86-elf.o sha256x86-elf.o sha512x86-elf.o:cx86-elf.o:rx86-elf.o:rm86-elf.o:r586-elf.o:wp_block.o w86mmx-elf.o:"; my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o mo86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o sha256x86-cof.o sha512x86-cof.o:cx86-cof.o:rx86-cof.o:rm86-cof.o:r586-cof.o:wp_block.o w86mmx-cof.o:"; my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o mo86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o sha256x86-out.o sha512x86-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o:wp_block.o w86mmx-out.o:"; +my $x86_macosx_asm="x86cpuid-macosx.o:bn86-macosx.o co86-macosx.o mo86-macosx.o:dx86-macosx.o yx86-macosx.o:ax86-macosx.o:bx86-macosx.o:mx86-macosx.o:sx86-macosx.o sha256x86-macosx.o sha512x86-macosx.o:cx86-macosx.o:rx86-macosx.o:rm86-macosx.o:r586-macosx.o:wp_block.o w86mmx-macosx.o:"; my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:"; my $ia64_asm="ia64cpuid.o:bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o::::"; @@ -518,7 +519,7 @@ my %table=( "rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::", "darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:ppccpuid_osx32.o:osx_ppc32.o osx_ppc32-mont.o:::::sha1-ppc_osx32.o sha256-ppc_osx32.o:::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:ppccpuid_osx64.o:osx_ppc64.o osx_ppc64-mont.o:::::sha1-ppc_osx64.o sha256-ppc_osx64.o sha512-ppc_osx64.o:::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", -"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", +"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_macosx_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}: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::osx_ppc32.o osx_ppc32-mont.o:::::sha1-ppc_osx32.o:::::::dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", diff --git a/TABLE b/TABLE index e75f69f98d..d6b4b79efa 100644 --- a/TABLE +++ b/TABLE @@ -1080,19 +1080,19 @@ $unistd = $thread_cflag = -D_REENTRANT $sys_id = MACOSX $lflags = -Wl,-search_paths_first% -$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR -$cpuid_obj = -$bn_obj = -$des_obj = -$aes_obj = -$bf_obj = -$md5_obj = -$sha1_obj = -$cast_obj = -$rc4_obj = -$rmd160_obj = -$rc5_obj = -$wp_obj = +$bn_ops = BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR +$cpuid_obj = x86cpuid-macosx.o +$bn_obj = bn86-macosx.o co86-macosx.o mo86-macosx.o +$des_obj = dx86-macosx.o yx86-macosx.o +$aes_obj = ax86-macosx.o +$bf_obj = bx86-macosx.o +$md5_obj = mx86-macosx.o +$sha1_obj = sx86-macosx.o sha256x86-macosx.o sha512x86-macosx.o +$cast_obj = cx86-macosx.o +$rc4_obj = rx86-macosx.o +$rmd160_obj = rm86-macosx.o +$rc5_obj = r586-macosx.o +$wp_obj = wp_block.o w86mmx-macosx.o $cmll_obj = $dso_scheme = dlfcn $shared_target= darwin-shared @@ -1914,13 +1914,13 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = $arflags = -*** debug-steve +*** debug-steve-opt $cc = gcc -$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe +$cflags = -m64 -O3 -DL_ENDIAN -DTERMIO -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -pedantic -Wall -Werror -Wno-long-long -DMD32_REG_T=int $unistd = $thread_cflag = -D_REENTRANT $sys_id = -$lflags = -rdynamic -ldl +$lflags = -ldl $bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL $cpuid_obj = x86_64cpuid.o $bn_obj = x86_64-gcc.o x86_64-mont.o @@ -1937,44 +1937,15 @@ $wp_obj = wp-x86_64.o $cmll_obj = $dso_scheme = dlfcn $shared_target= linux-shared -$shared_cflag = -$shared_ldflag = -$shared_extension = +$shared_cflag = -fPIC +$shared_ldflag = -m64 +$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = $arflags = -*** debug-steve-linux-pseudo64 +*** debug-steve32 $cc = gcc -$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe -$unistd = -$thread_cflag = -D_REENTRANT -$sys_id = -$lflags = -rdynamic -ldl -$bn_ops = SIXTY_FOUR_BIT -$cpuid_obj = -$bn_obj = -$des_obj = -$aes_obj = -$bf_obj = -$md5_obj = -$sha1_obj = -$cast_obj = -$rc4_obj = -$rmd160_obj = -$rc5_obj = -$wp_obj = -$cmll_obj = -$dso_scheme = dlfcn -$shared_target= linux-shared -$shared_cflag = -$shared_ldflag = -$shared_extension = -$ranlib = -$arflags = - -*** debug-steve-opt -$cc = gcc -$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -march=i486 -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe -O3 +$cflags = -m32 -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe $unistd = $thread_cflag = -D_REENTRANT $sys_id = @@ -1995,9 +1966,38 @@ $wp_obj = wp_block.o w86mmx-elf.o $cmll_obj = $dso_scheme = dlfcn $shared_target= linux-shared -$shared_cflag = -$shared_ldflag = -$shared_extension = +$shared_cflag = -fPIC +$shared_ldflag = -m32 +$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) +$ranlib = +$arflags = + +*** debug-steve64 +$cc = gcc +$cflags = -m64 -DL_ENDIAN -DTERMIO -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -pedantic -Wall -Werror -Wno-long-long -DMD32_REG_T=int +$unistd = +$thread_cflag = -D_REENTRANT +$sys_id = +$lflags = -ldl +$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL +$cpuid_obj = x86_64cpuid.o +$bn_obj = x86_64-gcc.o x86_64-mont.o +$des_obj = +$aes_obj = aes-x86_64.o +$bf_obj = +$md5_obj = md5-x86_64.o +$sha1_obj = sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o +$cast_obj = +$rc4_obj = rc4-x86_64.o +$rmd160_obj = +$rc5_obj = +$wp_obj = wp-x86_64.o +$cmll_obj = +$dso_scheme = dlfcn +$shared_target= linux-shared +$shared_cflag = -fPIC +$shared_ldflag = -m64 +$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = $arflags = diff --git a/config b/config index e77baa0942..d7c98813b1 100755 --- a/config +++ b/config @@ -278,7 +278,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in echo "ppc-apple-darwin${VERSION}" ;; *) - echo "i386-apple-darwin${VERSION}" + echo "i686-apple-darwin${VERSION}" ;; esac exit 0 @@ -536,7 +536,7 @@ case "$GUESSOS" in fi fi OUT="darwin-ppc-cc" ;; - i386-apple-darwin*) + i?86-apple-darwin*) ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null` if [ "$ISA64" = "1" ]; then echo "WARNING! If you wish to build 64-bit library, then you have to" diff --git a/crypto/Makefile b/crypto/Makefile index af2cac96d4..64a3d65440 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -64,6 +64,8 @@ x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@ x86cpuid-out.s: x86cpuid.pl perlasm/x86asm.pl $(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) > $@ +x86cpuid-macosx.s: x86cpuid.pl perlasm/x86asm.pl + $(PERL) x86cpuid.pl macosx $(CFLAGS) $(PROCESSOR) > $@ applink.o: $(TOP)/ms/applink.c $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c diff --git a/crypto/aes/Makefile b/crypto/aes/Makefile index 21c39d56ab..353778d4be 100644 --- a/crypto/aes/Makefile +++ b/crypto/aes/Makefile @@ -56,6 +56,8 @@ ax86-cof.s: asm/aes-586.pl ../perlasm/x86asm.pl (cd asm; $(PERL) aes-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@) ax86-out.s: asm/aes-586.pl ../perlasm/x86asm.pl (cd asm; $(PERL) aes-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@) +ax86-macosx.s: asm/aes-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) aes-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@) aes-x86_64.s: asm/aes-x86_64.pl $(PERL) asm/aes-x86_64.pl $@ diff --git a/crypto/bf/Makefile b/crypto/bf/Makefile index 8441954a8d..9f255efcaa 100644 --- a/crypto/bf/Makefile +++ b/crypto/bf/Makefile @@ -53,6 +53,8 @@ bx86-cof.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl # a.out bx86-out.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl (cd asm; $(PERL) bf-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@) +bx86-macosx.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) bf-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@) files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/bn/Makefile b/crypto/bn/Makefile index 2cc6fd6a05..c10348b34b 100644 --- a/crypto/bn/Makefile +++ b/crypto/bn/Makefile @@ -83,6 +83,12 @@ co86-out.s: asm/co-586.pl ../perlasm/x86asm.pl (cd asm; $(PERL) co-586.pl a.out $(CFLAGS) > ../$@) mo86-out.s: asm/x86-mont.pl ../perlasm/x86asm.pl (cd asm; $(PERL) x86-mont.pl a.out $(CFLAGS) > ../$@) +bn86-macosx.s: asm/bn-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) bn-586.pl macosx $(CFLAGS) > ../$@) +co86-macosx.s: asm/co-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) co-586.pl macosx $(CFLAGS) > ../$@) +mo86-macosx.s: asm/bn-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) x86-mont.pl macosx $(CFLAGS) > ../$@) sparcv8.o: asm/sparcv8.S $(CC) $(CFLAGS) -c asm/sparcv8.S diff --git a/crypto/cast/Makefile b/crypto/cast/Makefile index 149956ee90..baf91dd408 100644 --- a/crypto/cast/Makefile +++ b/crypto/cast/Makefile @@ -51,6 +51,8 @@ cx86-cof.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl # a.out cx86-out.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl (cd asm; $(PERL) cast-586.pl a.out $(CLAGS) $(PROCESSOR) > ../$@) +cx86-macosx.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) cast-586.pl macosx $(CLAGS) $(PROCESSOR) > ../$@) files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/des/Makefile b/crypto/des/Makefile index 38409ca6d1..74a556b01d 100644 --- a/crypto/des/Makefile +++ b/crypto/des/Makefile @@ -79,6 +79,10 @@ dx86-out.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl (cd asm; $(PERL) des-586.pl a.out $(CFLAGS) > ../$@) yx86-out.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl (cd asm; $(PERL) crypt586.pl a.out $(CFLAGS) > ../$@) +dx86-macosx.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) des-586.pl macosx $(CFLAGS) > ../$@) +yx86-macosx.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl + (cd asm; $(PERL) crypt586.pl macosx $(CFLAGS) > ../$@) files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/md5/Makefile b/crypto/md5/Makefile index 20259c3462..979f6f2a63 100644 --- a/crypto/md5/Makefile +++ b/crypto/md5/Makefile @@ -51,6 +51,8 @@ mx86-cof.s: asm/md5-586.pl ../perlasm/x86asm.pl # a.out mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@) +mx86-macosx.s: asm/md5-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) md5-586.pl macosx $(CFLAGS) > ../$@) md5-x86_64.s: asm/md5-x86_64.pl; $(PERL) asm/md5-x86_64.pl $@ diff --git a/crypto/rc4/Makefile b/crypto/rc4/Makefile index dcc6d2c816..e71f8ae90e 100644 --- a/crypto/rc4/Makefile +++ b/crypto/rc4/Makefile @@ -50,6 +50,8 @@ rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl # a.out rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@) +rx86-macosx.s: asm/rc4-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rc4-586.pl macosx $(CFLAGS) > ../$@) rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@ diff --git a/crypto/ripemd/Makefile b/crypto/ripemd/Makefile index d55875c20c..55fda567a6 100644 --- a/crypto/ripemd/Makefile +++ b/crypto/ripemd/Makefile @@ -51,6 +51,8 @@ rm86-cof.s: asm/rmd-586.pl ../perlasm/x86asm.pl # a.out rm86-out.s: asm/rmd-586.pl ../perlasm/x86asm.pl (cd asm; $(PERL) rmd-586.pl a.out $(CFLAGS) > ../$@) +rm86-macosx.s: asm/rmd-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) rmd-586.pl macosx $(CFLAGS) > ../$@) files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/sha/Makefile b/crypto/sha/Makefile index 763b2aad65..16f50ad6aa 100644 --- a/crypto/sha/Makefile +++ b/crypto/sha/Makefile @@ -64,6 +64,13 @@ sha256x86-out.s: asm/sha256-586.pl ../perlasm/x86asm.pl sha512x86-out.s: asm/sha512-586.pl ../perlasm/x86asm.pl (cd asm; $(PERL) sha512-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@) +sx86-macosx.s: asm/sha1-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) sha1-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@) +sha256x86-macosx.s: asm/sha256-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) sha256-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@) +sha512x86-macosx.s: asm/sha512-586.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) sha512-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@) + sha1-ia64.s: asm/sha1-ia64.pl (cd asm; $(PERL) sha1-ia64.pl $(CFLAGS) ) > $@ sha256-ia64.s: asm/sha512-ia64.pl diff --git a/crypto/whrlpool/Makefile b/crypto/whrlpool/Makefile index c0120a845a..89b0ad7054 100644 --- a/crypto/whrlpool/Makefile +++ b/crypto/whrlpool/Makefile @@ -48,6 +48,8 @@ w86mmx-cof.s: asm/wp-mmx.pl ../perlasm/x86asm.pl (cd asm; $(PERL) wp-mmx.pl coff $(CFLAGS) $(PROCESSOR)) > $@ w86mmx-out.s: asm/wp-mmx.pl ../perlasm/x86asm.pl (cd asm; $(PERL) wp-mmx.pl a.out $(CFLAGS) $(PROCESSOR)) > $@ +w86mmx-macosx.s: asm/wp-mmx.pl ../perlasm/x86asm.pl + (cd asm; $(PERL) wp-mmx.pl macosx $(CFLAGS) $(PROCESSOR)) > $@ wp-x86_64.s: asm/wp-x86_64.pl $(PERL) asm/wp-x86_64.pl $@