X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=Configurations%2F10-main.conf;h=52953a723077362265fba9d21a71c70c04399f9c;hp=45a685fba2471cebb9f575086bea00ec77428f63;hb=62890f47288687e4f0b7b2c1ce2da7c93ef21063;hpb=5fe5bc3094339626c6a7d3dd9149b7375c3940bb diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 45a685fba2..52953a7230 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -85,6 +85,18 @@ sub vms_info { 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; } @@ -110,7 +122,7 @@ sub 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", @@ -220,8 +232,7 @@ sub vms_info { # -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" ], @@ -239,7 +250,7 @@ sub vms_info { 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")), @@ -600,7 +611,7 @@ sub vms_info { 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"), @@ -1238,13 +1249,10 @@ sub vms_info { 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", @@ -1255,14 +1263,29 @@ sub vms_info { 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 = (); @@ -1643,7 +1666,7 @@ sub vms_info { "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", }, @@ -1740,10 +1763,16 @@ sub vms_info { #}, "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", @@ -1758,25 +1787,41 @@ sub vms_info { @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", @@ -1791,18 +1836,28 @@ sub vms_info { @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} || (); }), }, );