diff options
author | Richard Levitte <levitte@openssl.org> | 2016-04-12 16:03:02 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-04-13 11:36:46 +0200 |
commit | 0c9b1534265a59d099886fc916b859e55d268d8b (patch) | |
tree | 58ae36f57c14b6dd4e39a3dda3e14de4aecb9901 | |
parent | Fix zlib configuration options. (diff) | |
download | openssl-0c9b1534265a59d099886fc916b859e55d268d8b.tar.xz openssl-0c9b1534265a59d099886fc916b859e55d268d8b.zip |
Configuration: Simplify the way vms information is retrieved
Reviewed-by: Matt Caswell <matt@openssl.org>
-rw-r--r-- | Configurations/10-main.conf | 85 |
1 files changed, 44 insertions, 41 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 52953a7230..8c6ee7f0e3 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -78,23 +78,26 @@ sub vc_wince_info { my $vms_info = {}; sub vms_info { unless (%$vms_info) { - $vms_info->{disable_warns} = [ ]; - $vms_info->{disable_warns_p32} = [ ]; - $vms_info->{disable_warns_p64} = [ ]; - `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`; - if ($? == 0) { - push @{$vms_info->{disable_warns_p64}}, "MAYLOSEDATA3"; - } + my $pointer_size = shift; + my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size"; + + $vms_info->{disable_warns} = [ ]; + if ($pointer_size == 64) { + `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`; + if ($? == 0) { + push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3"; + } + } unless ($disabled{zlib}) { + my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str; 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'; + $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/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'; + $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib; + # In case the --with-zlib-lib value contains something like + # /SHARE or /LIB or so at the end, remove it. + $vms_info->{def_zlib} =~ s|/.*$||g; } } } @@ -1764,100 +1767,100 @@ sub vms_info { "vms-alpha" => { inherit_from => [ "vms-generic" ], cflags => add(sub { my @warnings = - @{vms_info()->{disable_warns}}; + @{vms_info(0)->{disable_warns}}; @warnings ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), defines => add(sub { - return vms_info()->{def_zlib} - ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : (); + return vms_info(0)->{def_zlib} + ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : (); }), - ex_libs => add(sub { return vms_info()->{zlib} || (); }), + ex_libs => add(sub { return vms_info(0)->{zlib} || (); }), #as => "???", #debug_aflags => "/NOOPTIMIZE/DEBUG", #release_aflags => "/OPTIMIZE/NODEBUG", bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR", }, "vms-alpha-p32" => { - inherit_from => [ "vms-alpha" ], + inherit_from => [ "vms-generic" ], cflags => add("/POINTER_SIZE=32", sub { my @warnings = - @{vms_info()->{disable_warns_p32}}; + @{vms_info(32)->{disable_warns}}; @warnings ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); } ), defines => add(sub { - return vms_info()->{def_zlib_p32} - ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p32}."\"\"\"" : (); + return vms_info(32)->{def_zlib} + ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : (); }), - ex_libs => add(sub { return vms_info()->{zlib_p32} || (); }), + ex_libs => add(sub { return vms_info(32)->{zlib} || (); }), }, "vms-alpha-p64" => { - inherit_from => [ "vms-alpha" ], + inherit_from => [ "vms-generic" ], cflags => add("/POINTER_SIZE=64=ARGV", sub { my @warnings = - @{vms_info()->{disable_warns_p64}}; + @{vms_info(64)->{disable_warns}}; @warnings ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); } ), defines => add(sub { - return vms_info()->{def_zlib_p64} - ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p64}."\"\"\"" : (); + return vms_info(64)->{def_zlib} + ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : (); }), - ex_libs => add(sub { return vms_info()->{zlib_p64} || (); }), + ex_libs => add(sub { return vms_info(64)->{zlib} || (); }), }, "vms-ia64" => { inherit_from => [ "vms-generic" ], cflags => add(sub { my @warnings = - @{vms_info()->{disable_warns}}; + @{vms_info(0)->{disable_warns}}; @warnings ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), defines => add(sub { - return vms_info()->{def_zlib} - ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : (); + return vms_info(0)->{def_zlib} + ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : (); }), - ex_libs => add(sub { return vms_info()->{zlib} || (); }), + ex_libs => add(sub { return vms_info(0)->{zlib} || (); }), #as => "I4S", #debug_aflags => "/NOOPTIMIZE/DEBUG", #release_aflags => "/OPTIMIZE/NODEBUG", bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR", }, "vms-ia64-p32" => { - inherit_from => [ "vms-ia64" ], + inherit_from => [ "vms-generic" ], cflags => add("/POINTER_SIZE=32", sub { my @warnings = - @{vms_info()->{disable_warns_p32}}; + @{vms_info(32)->{disable_warns}}; @warnings ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); } ), defines => add(sub { - return vms_info()->{def_zlib_p32} - ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p32}."\"\"\"" : (); + return vms_info(32)->{def_zlib} + ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : (); }), - ex_libs => add(sub { return vms_info()->{zlib_p32} || (); }), + ex_libs => add(sub { return vms_info(32)->{zlib} || (); }), }, "vms-ia64-p64" => { - inherit_from => [ "vms-ia64" ], + inherit_from => [ "vms-generic" ], cflags => add("/POINTER_SIZE=64=ARGV", sub { my @warnings = - @{vms_info()->{disable_warns_p64}}; + @{vms_info(64)->{disable_warns}}; @warnings ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); } ), defines => add(sub { - return vms_info()->{def_zlib_p64} - ? "LIBZ=\"\"\"".vms_info()->{def_zlib_p64}."\"\"\"" : (); + return vms_info(64)->{def_zlib} + ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : (); }), - ex_libs => add(sub { return vms_info()->{zlib_p64} || (); }), + ex_libs => add(sub { return vms_info(64)->{zlib} || (); }), }, ); |