Commit ca640568 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Engage x86 assembler in Mac OS X build.

parent df774284
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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",

+53 −53
Original line number Diff line number Diff line
@@ -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 = 
$ranlib       = 
$arflags      = 

*** debug-steve-linux-pseudo64
$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 = 
$shared_cflag = -fPIC
$shared_ldflag = -m64
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
$ranlib       = 
$arflags      = 

*** debug-steve-opt
*** debug-steve32
$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      = 

+2 −2
Original line number Diff line number Diff line
@@ -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"
+2 −0
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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 $@
Loading