if ($? == 0) {
push @{$vms_info->{disable_warns_p64}}, "MAYLOSEDATA3";
}
+
+ unless ($disabled{zlib}) {
+ if (defined($disabled{"zlib-dynamic"})) {
+ $vms_info->{zlib} = $withargs{zlib_lib} || 'GNV$LIBZSHR/SHARE';
+ $vms_info->{zlib_p32} = $withargs{zlib_lib} || 'GNV$LIBZSHR32/SHARE';
+ $vms_info->{zlib_p64} = $withargs{zlib_lib} || 'GNV$LIBZSHR64/SHARE';
+ } else {
+ $vms_info->{def_zlib} = $withargs{zlib_lib} || 'GNV$LIBZSHR';
+ $vms_info->{def_zlib_p32} = $withargs{zlib_lib} || 'GNV$LIBZSHR32';
+ $vms_info->{def_zlib_p64} = $withargs{zlib_lib} || 'GNV$LIBZSHR64';
+ }
+ }
}
return $vms_info;
}
inherit_from => [ "BASE_unix" ],
cc => "gcc",
cflags => picker(default => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
- debug => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
+ debug => "-O0 -g",
release => "-O3"),
thread_scheme => "(unknown)",
sys_id => "VOS",
# -m32 should be safe to add as long as driver recognizes
# -mcpu=ultrasparc
inherit_from => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
- cflags => add_before(picker(default => "-m32 -mcpu=ultrasparc",
- debug => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -O -g -pedantic -ansi -Wshadow -Wno-long-long -D__EXTENSIONS__")),
+ cflags => add_before("-m32 -mcpu=ultrasparc"),
},
"solaris64-sparcv9-gcc" => {
inherit_from => [ "solaris-sparcv9-gcc" ],
inherit_from => [ "solaris-common" ],
cc => "cc",
cflags => add_before(picker(default => "-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W",
- debug => "-g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG",
+ debug => "-g",
release => "-xO5 -xdepend"),
threads("-D_REENTRANT")),
lflags => add(threads("-mt")),
inherit_from => [ "BASE_unix" ],
cc => "gcc",
cflags => combine(picker(default => "-Wall",
- debug => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
+ debug => "-O0 -g",
release => "-O3"),
threads("-pthread")),
ex_libs => add("-ldl"),
coutflag => "/Fo",
rc => "rc",
rcoutflag => "/fo",
- lib_cflags => sub { join(" ",
- ($disabled{shared} ? "/Zl" : ()),
- "/Zi /Fdlib") },
+ lib_cflags => add("/Zi /Fdlib"),
dso_cflags => "/Zi",
bin_cflags => "/Zi /Fdapp",
lflags => add("/debug"),
- shared_cflag => "-D_WINDLL",
shared_ldflag => "/dll",
shared_target => "win-shared", # meaningless except it gives Configure a hint
thread_scheme => "winthreads",
cflags => add(picker(default => "-DUNICODE -D_UNICODE",
debug =>
sub {
- ($disabled{shared} ? "/MT" : "/MD")
- ."d /Od -DDEBUG -D_DEBUG";
+ ($disabled{shared} ? "" : "/MDd")
+ ." /Od -DDEBUG -D_DEBUG";
},
release =>
sub {
- ($disabled{shared} ? "/MT" : "/MD")
+ ($disabled{shared} ? "" : "/MD")
." /Ox /O2 /Ob2";
})),
+ lib_cflags => add(sub { $disabled{shared} ? "/MT /Zl" : () }),
+ # Following might/should appears controversial, i.e. defining
+ # /MDd without evaluating $disabled{shared}. It works in
+ # non-shared build because static library is compiled with /Zl
+ # and bares no reference to specific RTL. And it works in
+ # shared build because multiple /MDd options are not prohibited.
+ # But why /MDd in static build? Well, basically this is just a
+ # reference point, which allows to catch eventual errors that
+ # would prevent those who want to wrap OpenSSL into own .DLL.
+ # Why not /MD in release build then? Well, some are likely to
+ # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
+ # redistributable.
+ bin_cflags => add(picker(debug => "/MDd",
+ release => sub { $disabled{shared} ? "/MT" : () },
+ )),
bin_lflags => add("/subsystem:console /opt:ref"),
ex_libs => sub {
my @ex_libs = ();
"vxworks-ppc750-debug" => {
inherit_from => [ "BASE_unix" ],
cc => "ccppc",
- cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g",
+ cflags => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DPEDANTIC -DDEBUG -g",
sys_id => "VXWORKS",
lflags => "-r",
},
#},
"vms-alpha" => {
inherit_from => [ "vms-generic" ],
- cflags => sub { my @warnings =
- @{vms_info()->{disable_warns}};
- @warnings
- ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); },
+ cflags => add(sub { my @warnings =
+ @{vms_info()->{disable_warns}};
+ @warnings
+ ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
+ defines =>
+ add(sub {
+ return vms_info()->{def_zlib}
+ ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info()->{zlib} || (); }),
#as => "???",
#debug_aflags => "/NOOPTIMIZE/DEBUG",
#release_aflags => "/OPTIMIZE/NODEBUG",
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
} ),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
+ defines =>
+ add(sub {
+ return vms_info()->{def_zlib_p32}
+ ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p32}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info()->{zlib_p32} || (); }),
},
"vms-alpha-p64" => {
inherit_from => [ "vms-alpha" ],
cflags =>
- add("/POINTER_SIZE=64",
+ add("/POINTER_SIZE=64=ARGV",
sub { my @warnings =
@{vms_info()->{disable_warns_p64}};
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
} ),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
+ defines =>
+ add(sub {
+ return vms_info()->{def_zlib_p64}
+ ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p64}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info()->{zlib_p64} || (); }),
},
"vms-ia64" => {
inherit_from => [ "vms-generic" ],
- cflags => sub { my @warnings =
- @{vms_info()->{disable_warns}};
- @warnings
- ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); },
+ cflags => add(sub { my @warnings =
+ @{vms_info()->{disable_warns}};
+ @warnings
+ ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
+ defines =>
+ add(sub {
+ return vms_info()->{def_zlib}
+ ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info()->{zlib} || (); }),
#as => "I4S",
#debug_aflags => "/NOOPTIMIZE/DEBUG",
#release_aflags => "/OPTIMIZE/NODEBUG",
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
} ),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
+ defines =>
+ add(sub {
+ return vms_info()->{def_zlib_p32}
+ ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p32}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info()->{zlib_p32} || (); }),
},
"vms-ia64-p64" => {
inherit_from => [ "vms-ia64" ],
cflags =>
- add("/POINTER_SIZE=64",
+ add("/POINTER_SIZE=64=ARGV",
sub { my @warnings =
@{vms_info()->{disable_warns_p64}};
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
} ),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
+ defines =>
+ add(sub {
+ return vms_info()->{def_zlib_p64}
+ ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p64}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info()->{zlib_p64} || (); }),
},
);