summaryrefslogtreecommitdiff
path: root/vms/gen_shrfls.pl
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2019-08-25 13:50:46 -0500
committerCraig A. Berry <craigberry@mac.com>2019-08-25 14:52:34 -0500
commit8b4039846548684eda3376f80a4a5cb7a47ccc94 (patch)
treef352ca91fad69185cc0d3888464bef364f02d519 /vms/gen_shrfls.pl
parentc6f37d61adb39a6d7764b1bcb6bb67accb22a0a0 (diff)
downloadperl-8b4039846548684eda3376f80a4a5cb7a47ccc94.tar.gz
Prepare VMS linker GSMATCH for 5.32.
GSMATCH in the linker options file tells the image activator whether a dynamic library being loaded is compatible with what it originally linked against. Ideally we would like to encode the version number and all the options that can make a build binary incompatible with another build of the same version, but there are about 30 such options and only 8 bits (on Alpha) in which to store both the version number and the options. We've lived with only 3 bits reserved for 3 options, but as of version 32 of Perl 5, we'll need 6 bits for the version number: $ perl -e "$v = 31; printf('%b', $v);" 11111 $ perl -e "$v = 32; printf('%b', $v);" 100000 leaving us only 2 bits for options. The code modified here only kicks in when PERLSHR_USE_GSMATCH is defined in the environment.
Diffstat (limited to 'vms/gen_shrfls.pl')
-rw-r--r--vms/gen_shrfls.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl
index c3842c03d9..7b9f606194 100644
--- a/vms/gen_shrfls.pl
+++ b/vms/gen_shrfls.pl
@@ -180,18 +180,17 @@ my (@symfiles, $drvrname);
if ($ENV{PERLSHR_USE_GSMATCH}) {
if ($ENV{PERLSHR_USE_GSMATCH} eq 'INCLUDE_COMPILE_OPTIONS') {
# Build up a major ID. Since on Alpha it can only be 8 bits, we encode
- # the version number in the top 5 bits and use the bottom 3 for build
- # options most likely to cause incompatibilities. Breaks at Perl 5.32.
+ # the version number in the top 6 bits and use the bottom 2 for build
+ # options most likely to cause incompatibilities. Breaks at Perl 5.64.
my ($ver, $sub) = $] =~ /\.(\d\d\d)(\d\d\d)/;
$ver += 0; $sub += 0;
my $gsmatch = ($ver % 2 == 1) ? "EQUAL" : "LEQUAL"; # Force an equal match for
# dev, but be more forgiving
# for releases
- $ver <<= 3;
+ $ver <<= 2;
$ver += 1 if $debugging_enabled; # If DEBUGGING is set
$ver += 2 if $use_threads; # if we're threaded
- $ver += 4 if $use_mymalloc; # if we're using perl's malloc
print OPTBLD "GSMATCH=$gsmatch,$ver,$sub\n";
}
else {