aboutsummaryrefslogtreecommitdiff
path: root/openssl/util
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/util')
-rw-r--r--openssl/util/mk1mf.pl71
-rwxr-xr-x[-rw-r--r--]openssl/util/pl/VC-32.pl35
2 files changed, 89 insertions, 17 deletions
diff --git a/openssl/util/mk1mf.pl b/openssl/util/mk1mf.pl
index 72fa089f6..21e85539e 100644
--- a/openssl/util/mk1mf.pl
+++ b/openssl/util/mk1mf.pl
@@ -242,55 +242,98 @@ $inc_dir=(defined($VARS{'INC'}))?$VARS{'INC'}:$inc_def;
$bin_dir=$bin_dir.$o unless ((substr($bin_dir,-1,1) eq $o) || ($bin_dir eq ''));
$cflags= "$xcflags$cflags" if $xcflags ne "";
+$cdflags= "$xcflags$cflags" if $xcdflags ne "";
$cflags.=" -DOPENSSL_NO_IDEA" if $no_idea;
+$cdflags.=" -DOPENSSL_NO_IDEA" if $no_idea;
$cflags.=" -DOPENSSL_NO_AES" if $no_aes;
+$cdflags.=" -DOPENSSL_NO_AES" if $no_aes;
$cflags.=" -DOPENSSL_NO_CAMELLIA" if $no_camellia;
+$cdflags.=" -DOPENSSL_NO_CAMELLIA" if $no_camellia;
$cflags.=" -DOPENSSL_NO_SEED" if $no_seed;
+$cdflags.=" -DOPENSSL_NO_SEED" if $no_seed;
$cflags.=" -DOPENSSL_NO_RC2" if $no_rc2;
+$cdflags.=" -DOPENSSL_NO_RC2" if $no_rc2;
$cflags.=" -DOPENSSL_NO_RC4" if $no_rc4;
+$cdflags.=" -DOPENSSL_NO_RC4" if $no_rc4;
$cflags.=" -DOPENSSL_NO_RC5" if $no_rc5;
+$cdflags.=" -DOPENSSL_NO_RC5" if $no_rc5;
$cflags.=" -DOPENSSL_NO_MD2" if $no_md2;
+$cdflags.=" -DOPENSSL_NO_MD2" if $no_md2;
$cflags.=" -DOPENSSL_NO_MD4" if $no_md4;
+$cdflags.=" -DOPENSSL_NO_MD4" if $no_md4;
$cflags.=" -DOPENSSL_NO_MD5" if $no_md5;
+$cdflags.=" -DOPENSSL_NO_MD5" if $no_md5;
$cflags.=" -DOPENSSL_NO_SHA" if $no_sha;
+$cdflags.=" -DOPENSSL_NO_SHA" if $no_sha;
$cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1;
+$cdflags.=" -DOPENSSL_NO_SHA1" if $no_sha1;
$cflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd;
+$cdflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd;
$cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2;
+$cdflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2;
$cflags.=" -DOPENSSL_NO_BF" if $no_bf;
+$cdflags.=" -DOPENSSL_NO_BF" if $no_bf;
$cflags.=" -DOPENSSL_NO_CAST" if $no_cast;
+$cdflags.=" -DOPENSSL_NO_CAST" if $no_cast;
$cflags.=" -DOPENSSL_NO_DES" if $no_des;
+$cdflags.=" -DOPENSSL_NO_DES" if $no_des;
$cflags.=" -DOPENSSL_NO_RSA" if $no_rsa;
+$cdflags.=" -DOPENSSL_NO_RSA" if $no_rsa;
$cflags.=" -DOPENSSL_NO_DSA" if $no_dsa;
+$cdflags.=" -DOPENSSL_NO_DSA" if $no_dsa;
$cflags.=" -DOPENSSL_NO_DH" if $no_dh;
+$cdflags.=" -DOPENSSL_NO_DH" if $no_dh;
$cflags.=" -DOPENSSL_NO_WHIRLPOOL" if $no_whirlpool;
+$cdflags.=" -DOPENSSL_NO_WHIRLPOOL" if $no_whirlpool;
$cflags.=" -DOPENSSL_NO_SOCK" if $no_sock;
+$cdflags.=" -DOPENSSL_NO_SOCK" if $no_sock;
$cflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2;
+$cdflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2;
$cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3;
+$cdflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3;
$cflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext;
+$cdflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext;
$cflags.=" -DOPENSSL_NO_SRP" if $no_srp;
+$cdflags.=" -DOPENSSL_NO_SRP" if $no_srp;
$cflags.=" -DOPENSSL_NO_CMS" if $no_cms;
+$cdflags.=" -DOPENSSL_NO_CMS" if $no_cms;
$cflags.=" -DOPENSSL_NO_ERR" if $no_err;
+$cdflags.=" -DOPENSSL_NO_ERR" if $no_err;
$cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
+$cdflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
$cflags.=" -DOPENSSL_NO_EC" if $no_ec;
+$cdflags.=" -DOPENSSL_NO_EC" if $no_ec;
$cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa;
+$cdflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa;
$cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
+$cdflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
$cflags.=" -DOPENSSL_NO_GOST" if $no_gost;
+$cdflags.=" -DOPENSSL_NO_GOST" if $no_gost;
$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
+$cdflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
$cflags.=" -DOPENSSL_NO_HW" if $no_hw;
+$cdflags.=" -DOPENSSL_NO_HW" if $no_hw;
$cflags.=" -DOPENSSL_FIPS" if $fips;
+$cdflags.=" -DOPENSSL_FIPS" if $fips;
$cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake;
+$cdflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake;
$cflags.=" -DOPENSSL_NO_EC2M" if $no_ec2m;
+$cdflags.=" -DOPENSSL_NO_EC2M" if $no_ec2m;
$cflags.= " -DZLIB" if $zlib_opt;
+$cdflags.= " -DZLIB" if $zlib_opt;
$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
+$cdflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
if ($no_static_engine)
{
$cflags .= " -DOPENSSL_NO_STATIC_ENGINE";
+ $cdflags .= " -DOPENSSL_NO_STATIC_ENGINE";
}
else
{
$cflags .= " -DOPENSSL_NO_DYNAMIC_ENGINE";
+ $cdflags .= " -DOPENSSL_NO_DYNAMIC_ENGINE";
}
#$cflags.=" -DRSAref" if $rsaref ne "";
@@ -443,10 +486,26 @@ $defs.= <<"EOF";
INSTALLTOP=$INSTALLTOP
OPENSSLDIR=$OPENSSLDIR
+!ifdef DEBUG
+# The output directory for everything intersting
+OUT_D=out32_d
+# The output directory for all the temporary muck
+TMP_D=tmp32_d
+!else
+# The output directory for everything intersting
+OUT_D=out32
+# The output directory for all the temporary muck
+TMP_D=tmp32
+!endif
+
# Set your compiler options
PLATFORM=$platform
CC=$bin_dir${cc}
+!ifdef DEBUG
+CFLAG=$cdflags
+!else
CFLAG=$cflags
+!endif
APP_CFLAG=$app_cflag
LIB_CFLAG=$lib_cflag
SHLIB_CFLAG=$shl_cflag
@@ -460,13 +519,13 @@ EX_LIBS=$ex_libs
SRC_D=$src_dir
LINK=$link
+!ifdef DEBUG
+LFLAGS=$lflagsd
+!else
LFLAGS=$lflags
+!endif
RSC=$rsc
-# The output directory for everything intersting
-OUT_D=$out_dir
-# The output directory for all the temporary muck
-TMP_D=$tmp_dir
# The output directory for the header files
INC_D=$inc_dir
INCO_D=$inc_dir${o}openssl
@@ -476,7 +535,11 @@ CP=$cp
RM=$rm
RANLIB=$ranlib
MKDIR=$mkdir
+!ifdef DEBUG
+MKLIB=$bin_dir$mklibd
+!else
MKLIB=$bin_dir$mklib
+!endif
MLFLAGS=$mlflags
ASM=$bin_dir$asm
diff --git a/openssl/util/pl/VC-32.pl b/openssl/util/pl/VC-32.pl
index 6c550f54a..e6e185e89 100644..100755
--- a/openssl/util/pl/VC-32.pl
+++ b/openssl/util/pl/VC-32.pl
@@ -47,7 +47,8 @@ if ($FLAVOR =~ /WIN64/)
$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";
+ $lflags="/NOLOGO /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG:STATUS";
+ $lflagsd="/NOLOGO /SUBSYSTEM:CONSOLE";
*::perlasm_compile_target = sub {
my ($target,$source,$bname)=@_;
@@ -119,22 +120,25 @@ elsif ($FLAVOR =~ /CE/)
$base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'}));
$opt_cflags=' /MC /O1i'; # optimize for space, but with intrinsics...
$dbg_cflags=' /MC /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';
$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
- $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";
}
$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";
@@ -145,12 +149,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';
@@ -180,8 +186,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";
@@ -236,11 +244,12 @@ 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;
+ $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...
@@ -269,8 +278,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";
}