[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssl-cvs
Subject:    [CVS] OpenSSL: openssl/ Configure TABLE openssl/util/ mk1mf.pl openssl...
From:       "Andy Polyakov" <appro () openssl ! org>
Date:       2008-01-13 17:56:03
Message-ID: 20080113175603.01E2F1EAE841 () master ! openssl ! org
[Download RAW message or body]

  OpenSSL CVS Repository
  http://cvs.openssl.org/
  ____________________________________________________________________________

  Server: cvs.openssl.org                  Name:   Andy Polyakov
  Root:   /v/openssl/cvs                   Email:  appro@openssl.org
  Module: openssl                          Date:   13-Jan-2008 18:56:02
  Branch: HEAD                             Handle: 2008011317560101

  Modified files:
    openssl                 Configure TABLE
    openssl/util            mk1mf.pl
    openssl/util/pl         VC-32.pl

  Log:
    Automate assembler support for Win64 targets (more work is needed).

  Summary:
    Revision    Changes     Path
    1.587       +9  -7      openssl/Configure
    1.240       +18 -48     openssl/TABLE
    1.90        +1  -0      openssl/util/mk1mf.pl
    1.54        +28 -11     openssl/util/pl/VC-32.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openssl/Configure
  ============================================================================
  $ cvs diff -u -r1.586 -r1.587 Configure
  --- openssl/Configure	11 Jan 2008 13:15:05 -0000	1.586
  +++ openssl/Configure	13 Jan 2008 17:56:01 -0000	1.587
  @@ -178,7 +178,7 @@
   "debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG \
-DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro \
-Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} \
${x86_gcc_opts}:${x86_elf_asm}:dlfcn",  "debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK \
-DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 \
-Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} \
${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  "debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG \
-DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG \
${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
                
  -"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -DTERMIO -O3 \
-fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} \
${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o \
crypt586.o:aes_x86core.o aes_cbc.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o \
sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o \
wp-mmx.o:elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",  \
+"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -DTERMIO -O3 \
-fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} \
${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o \
crypt586.o:aes_x86core.o aes_cbc.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o \
sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o \
wp-mmx.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",  \
"dist",		"cc:-O::(unknown)::::::",  
   # Basic configs that should work on any (32 and less bit) box
  @@ -476,14 +476,16 @@
   #
   "OS390-Unix","c89.sh:-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H  \
-D_ALL_SOURCE::(unknown):::THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX \
RC4_CHAR BF_PTR:::",  
  -# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
  -"VC-WIN64I","cl::::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT \
                EXPORT_VAR_AS_FN:${no_asm}:win32",
  -"VC-WIN64A","cl::::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT \
                EXPORT_VAR_AS_FN:${no_asm}:win32",
  -
   # Visual C targets
  -"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN \
                ${x86_gcc_opts}:${no_asm}:win32",
  -"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN \
${x86_gcc_opts}:${no_asm}:win32",  +#
  +# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
  +"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN \
-DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_NONSTDC_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT \
EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o \
aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",  \
+"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN \
-DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_NONSTDC_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT \
EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.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::ml64:win32",  +# x86 Win32 target \
defaults to ANSI API, if you want UNICODE, complement  +# 'perl Configure VC-WIN32' \
with '-DUNICODE -D_UNICODE'  "VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo \
-DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_NONSTDC_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN \
${x86_gcc_opts}:${x86_win32_asm}:win32",  +# Unified CE target
  +"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN \
${x86_gcc_opts}:${no_asm}:win32",  
   # Borland C++ 4.5
   "BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX \
EXPORT_VAR_AS_FN:${no_asm}:win32",  @@ .
  patch -p0 <<'@@ .'
  Index: openssl/TABLE
  ============================================================================
  $ cvs diff -u -r1.239 -r1.240 TABLE
  --- openssl/TABLE	11 Jan 2008 13:15:06 -0000	1.239
  +++ openssl/TABLE	13 Jan 2008 17:56:01 -0000	1.240
  @@ -630,36 +630,6 @@
   $ranlib       = 
   $arflags      = 
   
  -*** VC-NT
  -$cc           = cl
  -$cflags       = 
  -$unistd       = 
  -$thread_cflag = 
  -$sys_id       = WINNT
  -$lflags       = 
  -$bn_ops       = BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN RC4_INDEX MD2_INT
  -$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     = 
  -$perlasm_scheme = void
  -$dso_scheme   = win32
  -$shared_target= 
  -$shared_cflag = 
  -$shared_ldflag = 
  -$shared_extension = 
  -$ranlib       = 
  -$arflags      = 
  -
   *** VC-WIN32
   $cc           = cl
   $cflags       = -W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 \
-DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_NONSTDC_NO_DEPRECATE  @@ -681,7 +651,7 @@
   $rc5_obj      = rc5-586.o
   $wp_obj       = wp_block.o wp-mmx.o
   $cmll_obj     = 
  -$perlasm_scheme = win32
  +$perlasm_scheme = win32n
   $dso_scheme   = win32
   $shared_target= 
   $shared_cflag = 
  @@ -692,26 +662,26 @@
   
   *** VC-WIN64A
   $cc           = cl
  -$cflags       = 
  +$cflags       = -W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN \
-DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_NONSTDC_NO_DEPRECATE  $unistd       = 
   $thread_cflag = 
   $sys_id       = WIN64A
   $lflags       = 
   $bn_ops       = SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN
  -$cpuid_obj    = 
  -$bn_obj       = 
  +$cpuid_obj    = x86_64cpuid.o
  +$bn_obj       = bn_asm.o x86_64-mont.o
   $des_obj      = 
  -$aes_obj      = 
  +$aes_obj      = aes-x86_64.o
   $bf_obj       = 
  -$md5_obj      = 
  -$sha1_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_obj      = rc4-x86_64.o
   $rmd160_obj   = 
   $rc5_obj      = 
  -$wp_obj       = 
  +$wp_obj       = wp-x86_64.o
   $cmll_obj     = 
  -$perlasm_scheme = void
  +$perlasm_scheme = ml64
   $dso_scheme   = win32
   $shared_target= 
   $shared_cflag = 
  @@ -722,26 +692,26 @@
   
   *** VC-WIN64I
   $cc           = cl
  -$cflags       = 
  +$cflags       = -W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN \
-DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_NONSTDC_NO_DEPRECATE  $unistd       = 
   $thread_cflag = 
   $sys_id       = WIN64I
   $lflags       = 
   $bn_ops       = SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN
  -$cpuid_obj    = 
  -$bn_obj       = 
  +$cpuid_obj    = ia64cpuid.o
  +$bn_obj       = ia64.o
   $des_obj      = 
  -$aes_obj      = 
  +$aes_obj      = aes_core.o aes_cbc.o aes-ia64.o
   $bf_obj       = 
  -$md5_obj      = 
  -$sha1_obj     = 
  +$md5_obj      = md5-ia64.o
  +$sha1_obj     = sha1-ia64.o sha256-ia64.o sha512-ia64.o
   $cast_obj     = 
   $rc4_obj      = 
   $rmd160_obj   = 
   $rc5_obj      = 
   $wp_obj       = 
   $cmll_obj     = 
  -$perlasm_scheme = void
  +$perlasm_scheme = ias
   $dso_scheme   = win32
   $shared_target= 
   $shared_cflag = 
  @@ -1751,7 +1721,7 @@
   $cpuid_obj    = x86cpuid.o
   $bn_obj       = bn-586.o co-586.o x86-mont.o
   $des_obj      = des-586.o crypt586.o
  -$aes_obj      = aes-586.o
  +$aes_obj      = aes_x86core.o aes_cbc.o
   $bf_obj       = bf-586.o
   $md5_obj      = md5-586.o
   $sha1_obj     = sha1-586.o sha256-586.o sha512-586.o
  @@ .
  patch -p0 <<'@@ .'
  Index: openssl/util/mk1mf.pl
  ============================================================================
  $ cvs diff -u -r1.89 -r1.90 mk1mf.pl
  --- openssl/util/mk1mf.pl	11 Jan 2008 11:59:36 -0000	1.89
  +++ openssl/util/mk1mf.pl	13 Jan 2008 17:56:02 -0000	1.90
  @@ -871,6 +871,7 @@
   			$ret.=&cc_compile_target("$to${o}$n$obj","${_}.c",$ex)
   			}
   		elsif (-f ($s="${d}${o}asm${o}${n}.pl") or
  +		       ($s=~s/sha256/sha512/ and -f $s) or
   		       -f ($s="${d}${o}${n}.pl"))
   			{
   			$ret.=&perlasm_compile_target("$to${o}$n$obj",$s,$n);
  @@ .
  patch -p0 <<'@@ .'
  Index: openssl/util/pl/VC-32.pl
  ============================================================================
  $ cvs diff -u -r1.53 -r1.54 VC-32.pl
  --- openssl/util/pl/VC-32.pl	11 Jan 2008 11:59:37 -0000	1.53
  +++ openssl/util/pl/VC-32.pl	13 Jan 2008 17:56:02 -0000	1.54
  @@ -28,14 +28,27 @@
       # per 0.9.8 release remaining warnings were explicitly examined and
       # considered safe to ignore.
       # 
  -    $base_cflags=' /W3 /Gs0 /GF /Gy /nologo -DWIN32_LEAN_AND_MEAN -DL_ENDIAN \
                -DDSO_WIN32 -DOPENSSL_SYSNAME_WIN32 -DOPENSSL_SYSNAME_WINNT -DUNICODE \
                -D_UNICODE';
  -    $base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE';	# shut up VC8
  -    $base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE';	# shut up VC8
  +    $base_cflags= " $mf_cflag";
       my $f = $shlib?' /MD':' /MT';
       $lib_cflag='/Zl' if (!$shlib);	# remove /DEFAULTLIBs from static lib
       $opt_cflags=$f.' /Ox';
       $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
       $lflags="/nologo /subsystem:console /opt:ref";
  +
  +    *::perlasm_compile_target = sub {
  +	my ($target,$source,$bname)=@_;
  +	my $ret;
  +
  +	$bname =~ s/(.*)\.[^\.]$/$1/;
  +	$ret=<<___;
  +\$(TMP_D)$o$bname.asm: $source
  +	\$(PERL) $source \$\@
  +
  +$target: \$(TMP_D)$o$bname.asm
  +	\$(ASM) $afile\$\@ \$(TMP_D)$o$bname.asm
  +
  +___
  +	}
       }
   elsif ($FLAVOR =~ /CE/)
       {
  @@ -142,15 +155,11 @@
   	{
   	$ex_libs.=' gdi32.lib advapi32.lib user32.lib';
   	$ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
  +	# WIN32 UNICODE build gets linked with unicows.lib for
  +	# backward compatibility with Win9x.
  +	$ex_libs="unicows.lib $ex_libs" if ($FLAVOR =~ /WIN32/ and $cflags =~ \
/\-DUNICODE/);  }
   
  -# As native NT API is pure UNICODE, our WIN-NT build defaults to UNICODE,
  -# but gets linked with unicows.lib to ensure backward compatibility.
  -if ($FLAVOR =~ /NT/)
  -	{
  -	$cflags.=" -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE";
  -	$ex_libs="unicows.lib $ex_libs";
  -	}
   # static library stuff
   $mklib='lib';
   $ranlib='';
  @@ -161,7 +170,15 @@
   
   $shlib_ex_obj="";
   $app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/);
  -if ($nasm) {
  +if ($FLAVOR =~ /WIN64A/) {
  +	$asm='ml64 /c /Cp /Cx';
  +	$asm.=" /Zi" if $debug;
  +	$afile='/Fo';
  +} elsif ($FLAVOR =~ /WIN64I/) {
  +	$asm='ias';
  +	$asm.=" -d debug" if $debug;
  +	$afile="-o ";
  +} elsif ($nasm) {
   	my $ver=`nasm -v 2>NUL`;
   	my $vew=`nasmw -v 2>NUL`;
   	# pick newest version
  @@ .
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
CVS Repository Commit List                     openssl-cvs@openssl.org
Automated List Manager                           majordomo@openssl.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic