summaryrefslogtreecommitdiffstats
path: root/Configurations/platform
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-10-23 15:00:36 +0200
committerRichard Levitte <levitte@openssl.org>2019-01-21 19:31:32 +0100
commitc162a8c344f12b2e0e788920358f51181ddf168f (patch)
treeee221812ca4b291d598d3bedccf64cdde03dea92 /Configurations/platform
parent957689611b355f3514bd9051829f3a9a0d9d4517 (diff)
Rework building: VMS changes to handle extensions and product names
Add platform::VMS, which is a generic VMS module. Additional modules to support specific building aspects (such as specific compilers) may be added later, but since we currently work on file names and those are generic enough, this is also enough. This reworks Configurations/descrip.mms.tmpl to work out product names in platform::VMS terms. Something to be noted is that the new functionality ignores the *_extension config attributes, as they were never used. VMS is very consistent in its use of extensions, so there is no reason to believe much will change in this respect. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7473)
Diffstat (limited to 'Configurations/platform')
-rw-r--r--Configurations/platform/VMS.pm66
1 files changed, 66 insertions, 0 deletions
diff --git a/Configurations/platform/VMS.pm b/Configurations/platform/VMS.pm
new file mode 100644
index 0000000000..03e57e3ddb
--- /dev/null
+++ b/Configurations/platform/VMS.pm
@@ -0,0 +1,66 @@
+package platform::VMS;
+
+use strict;
+use warnings;
+use Carp;
+
+use vars qw(@ISA);
+
+require platform::BASE;
+@ISA = qw(platform::BASE);
+
+# Assume someone set @INC right before loading this module
+use configdata;
+
+# VMS has a cultural standard where all installed libraries are prefixed.
+# For OpenSSL, the choice is 'ossl$' (this prefix was claimed in a
+# conversation with VSI, Tuesday January 26 2016)
+sub osslprefix { 'OSSL$' }
+
+sub binext { '.EXE' }
+sub dsoext { '.EXE' }
+sub shlibext { '.EXE' }
+sub libext { '.OLB' }
+sub defext { '.OPT' }
+sub objext { '.OBJ' }
+sub depext { '.D' }
+sub asmext { '.ASM' }
+
+# Other extra that aren't defined in platform::BASE
+sub shlibvariant { $target{shlib_variant} || '' }
+
+sub optext { '.OPT' }
+sub optname { return $_[1] }
+sub opt { return $_[0]->optname($_[1]) . $_[0]->optext() }
+
+# Other projects include the pointer size in the name of installed libraries,
+# so we do too.
+sub staticname {
+ # Non-installed libraries are *always* static, and their names remain
+ # the same, except for the mandatory extension
+ my $in_libname = platform::BASE->staticname($_[1]);
+ return $in_libname
+ unless ( grep { platform::BASE->staticname($_) eq $in_libname }
+ @{$unified_info{install}->{libraries}} );
+
+ return platform::BASE::__concat($_[0]->osslprefix(),
+ platform::BASE->staticname($_[1]),
+ $target{pointer_size});
+}
+
+# To enable installation of multiple major OpenSSL releases, we include the
+# version number in installed shared library names.
+my $sover_filename =
+ join('', map { sprintf "%02d", $_ } split(m|\.|, $config{shlib_version}));
+sub shlib_version_as_filename {
+ return $sover_filename;
+}
+sub sharedname {
+ return platform::BASE::__concat($_[0]->osslprefix(),
+ platform::BASE->sharedname($_[1]),
+ $_[0]->shlib_version_as_filename(),
+ ($_[0]->shlibvariant() // ''),
+ "_shr$target{pointer_size}");
+}
+
+1;