diff options
Diffstat (limited to 'openssl/util/pl')
-rwxr-xr-x[-rw-r--r--] | openssl/util/pl/VC-32.pl | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/openssl/util/pl/VC-32.pl b/openssl/util/pl/VC-32.pl index 852eb30d0..78a49354e 100644..100755 --- a/openssl/util/pl/VC-32.pl +++ b/openssl/util/pl/VC-32.pl @@ -16,7 +16,7 @@ else $crypto="libeay32"; } -$o='\\'; +$o='/'; $cp='$(PERL) util/copy.pl'; $mkdir='$(PERL) util/mkdir-p.pl'; $rm='del /Q'; @@ -45,10 +45,11 @@ if ($FLAVOR =~ /WIN64/) # considered safe to ignore. # $base_cflags= " $mf_cflag"; - my $f = $shlib || $fips ?' /MD':' /MT'; - $opt_cflags=$f.' /Ox'; - $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; - $lflags="/nologo /subsystem:console /opt:ref"; + my $f = ' /MD'; + $opt_cflags=$f.' /O2 /Ob2 /Oi /Ox /Oy /Ot /GL /Gy /GF /Zi'; + $dbg_cflags=$f.'d /RTCc /RTC1 /Od /GS /GR /Gy /GF /Zi'; + $lflags="/NOLOGO /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG:STATUS"; + $lflagsd="/NOLOGO /SUBSYSTEM:CONSOLE"; *::perlasm_compile_target = sub { my ($target,$source,$bname)=@_; @@ -119,29 +120,32 @@ elsif ($FLAVOR =~ /CE/) $base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'})); $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'})); if (`$cc 2>&1` =~ /Version ([0-9]+)\./ && $1>=14) { - $base_cflags.=$shlib?' /MD':' /MT'; + $base_cflags.=' /MD'; } else { $base_cflags.=' /MC'; } $opt_cflags=' /O1i'; # optimize for space, but with intrinsics... $dbg_cflags=' /Od -DDEBUG -D_DEBUG'; - $lflags="/nologo /opt:ref $wcelflag"; + $lflags="/NOLOGO /OPT:REF /OPT:ICF /LTCG:STATUS $wcelflag"; + $lflagsd="/NOLOGO $wcelflag"; } else # Win32 { $base_cflags= " $mf_cflag"; - my $f = $shlib || $fips ?' /MD':' /MT'; + + my $f = ' /MD'; $ff = "/fixed"; - $opt_cflags=$f.' /Ox /O2 /Ob2'; - $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; - $lflags="/nologo /subsystem:console /opt:ref"; + $opt_cflags=$f.' /O2 /Ob2 /Oi /Ox /Oy /Ot /GL /Gy /GF /Zi'; + $dbg_cflags=$f.'d /RTCc /RTC1 /Od /GS /GR /Gy /GF /Zi'; + $lflags="/NOLOGO /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG:STATUS"; + $lflagsd="/NOLOGO /SUBSYSTEM:CONSOLE"; } $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib $mlflags=''; -$out_def ="out32"; $out_def.="dll" if ($shlib); +$out_def ="\$(OUT_D)"; $out_def.="dll" if ($shlib); $out_def.='_$(TARGETCPU)' if ($FLAVOR =~ /CE/); -$tmp_def ="tmp32"; $tmp_def.="dll" if ($shlib); +$tmp_def ="\$(TMP_D)"; $tmp_def.="dll" if ($shlib); $tmp_def.='_$(TARGETCPU)' if ($FLAVOR =~ /CE/); $inc_def="inc32"; @@ -152,12 +156,14 @@ if ($debug) else { $cflags=$opt_cflags.$base_cflags; + $cdflags=$dbg_cflags.$base_cflags; } # generate symbols.pdb unconditionally $app_cflag.=" /Zi /Fd\$(TMP_D)/app"; $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; -$lflags.=" /debug"; +$lflags.=" /DEBUG"; +$lflagsd.=" /DEBUG"; $obj='.obj'; $asm_suffix='.asm'; @@ -199,8 +205,10 @@ else $ex_libs="unicows.lib $ex_libs" if ($FLAVOR =~ /WIN32/ and $cflags =~ /\-DUNICODE/); } + $cdflags.=" -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE"; # static library stuff -$mklib='lib /nologo'; +$mklib='lib /nologo /LTCG'; +$mklibd='lib /nologo'; $ranlib=''; $plib=""; $libp=".lib"; @@ -255,11 +263,16 @@ if (!$no_asm) win32_import_asm($mf_wp_asm, "whrlpool", \$whirlpool_asm_obj, \$whirlpool_asm_src); win32_import_asm($mf_cpuid_asm, "", \$cpuid_asm_obj, \$cpuid_asm_src); $perl_asm = 1; + if ($FLAVOR =~ /WIN64A/) { + $cdflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_MONT -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; + } else { + $cdflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; + } } if ($shlib && $FLAVOR !~ /CE/) { - $mlflags.=" $lflags /dll"; + $mlflags.=" $lflags /DLL"; $lib_cflag.=" -D_WINDLL"; # # Engage Applink... @@ -288,8 +301,8 @@ ___ } elsif ($shlib && $FLAVOR =~ /CE/) { - $mlflags.=" $lflags /dll"; - $lflags.=' /entry:mainCRTstartup' if(defined($ENV{'PORTSDK_LIBPATH'})); + $mlflags.=" $lflags /DLL"; + $lflags.=' /ENTRY:mainCRTstartup' if(defined($ENV{'PORTSDK_LIBPATH'})); $lib_cflag.=" -D_WINDLL -D_DLL"; } |