[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Tue Mar 29 19:42:57 UTC 2016
The branch master has been updated
via 5fe5bc3094339626c6a7d3dd9149b7375c3940bb (commit)
from 85112d53c5d43f99f4efe899c66ef858246f512e (commit)
- Log -----------------------------------------------------------------
commit 5fe5bc3094339626c6a7d3dd9149b7375c3940bb
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Mar 29 20:18:31 2016 +0200
VMS: Disable the warning MAYLOSEDATA3
The warning MAYLOSEDATA3 is one you will always get when compiling
source that calculates the difference between two pointers with
/POINTER_SIZE=64.
The reason is quite simple, ptrdiff_t is always a 32-bit integer
regardless of pointer size, so the result of 'ptr1 - ptr2' can
potentially be larger than a 32-bit integer. The compiler simply
warns you of that possibility.
However, we only use pointer difference within objects and strings,
all of them well within 2^32 bytes in size, so that operation is
harmless with our source, and we can therefore safely turn off that
warning.
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
Configurations/10-main.conf | 70 +++++++++++++++++++++++++++++++++++++--------
1 file changed, 58 insertions(+), 12 deletions(-)
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 4e9579c..45a685f 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -74,6 +74,20 @@ sub vc_wince_info {
return $vc_wince_info;
}
+# Helper functions for the VMS configs
+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";
+ }
+ }
+ return $vms_info;
+}
%targets = (
@@ -1726,37 +1740,69 @@ sub vc_wince_info {
#},
"vms-alpha" => {
inherit_from => [ "vms-generic" ],
+ cflags => sub { my @warnings =
+ @{vms_info()->{disable_warns}};
+ @warnings
+ ? "/WARNINGS=DISABLE=(".join(",", at warnings).")" : (); },
#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" ],
- cflags => add("/POINTER_SIZE=32"),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
+ inherit_from => [ "vms-alpha" ],
+ cflags =>
+ add("/POINTER_SIZE=32",
+ sub { my @warnings =
+ @{vms_info()->{disable_warns_p32}};
+ @warnings
+ ? "/WARNINGS=DISABLE=(".join(",", at warnings).")" : ();
+ } ),
+ ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
},
"vms-alpha-p64" => {
- inherit_from => [ "vms-alpha" ],
- cflags => add("/POINTER_SIZE=64"),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
+ inherit_from => [ "vms-alpha" ],
+ cflags =>
+ add("/POINTER_SIZE=64",
+ sub { my @warnings =
+ @{vms_info()->{disable_warns_p64}};
+ @warnings
+ ? "/WARNINGS=DISABLE=(".join(",", at warnings).")" : ();
+ } ),
+ ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
},
"vms-ia64" => {
inherit_from => [ "vms-generic" ],
+ cflags => sub { my @warnings =
+ @{vms_info()->{disable_warns}};
+ @warnings
+ ? "/WARNINGS=DISABLE=(".join(",", at warnings).")" : (); },
#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" ],
- cflags => add("/POINTER_SIZE=32"),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
+ inherit_from => [ "vms-ia64" ],
+ cflags =>
+ add("/POINTER_SIZE=32",
+ sub { my @warnings =
+ @{vms_info()->{disable_warns_p32}};
+ @warnings
+ ? "/WARNINGS=DISABLE=(".join(",", at warnings).")" : ();
+ } ),
+ ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
},
"vms-ia64-p64" => {
- inherit_from => [ "vms-ia64" ],
- cflags => add("/POINTER_SIZE=64"),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
+ inherit_from => [ "vms-ia64" ],
+ cflags =>
+ add("/POINTER_SIZE=64",
+ sub { my @warnings =
+ @{vms_info()->{disable_warns_p64}};
+ @warnings
+ ? "/WARNINGS=DISABLE=(".join(",", at warnings).")" : ();
+ } ),
+ ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
},
);
More information about the openssl-commits
mailing list