summaryrefslogtreecommitdiffstats
path: root/Configurations/platform/Cygwin.pm
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-10-23 15:09:57 +0200
committerRichard Levitte <levitte@openssl.org>2019-01-21 19:31:32 +0100
commit9dd4ed28eb5972f62723985429b57f42eefda124 (patch)
tree6c5d9d1cba152032d08725e885a532f82332beae /Configurations/platform/Cygwin.pm
parentc162a8c344f12b2e0e788920358f51181ddf168f (diff)
Rework building: Unix changes to handle extensions and product names
Add platform::Unix, which is a generic Unix module to support product name and extensions functionlity. However, this isn't quite enough, as mingw and Cygwin builds are done using the same templates, but since shared libraries work as on Windows and are named accordingly, platform::mingw and platform::Cygwin were also added to provide the necessary tweaks. This reworks Configurations/unix-Makefile.tmpl to work out product names in platform::Unix et al terms. In this one, we currently do care about the *_extension config attributes, and the modules adapt accordingly where it matters. This change also affected crypto/include/internal/dso_conf.h.in, since the DSO extension is meant to be the same as the short shared library extension, which isn't '.so' everywhere. 'shared_extension' attributes that had the value '.so.\$(SHLIB_VERSION_NUMBER)' are removed, platform::Unix provides an extension where the shared library version number is hard-coded instead. 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/Cygwin.pm')
-rw-r--r--Configurations/platform/Cygwin.pm22
1 files changed, 22 insertions, 0 deletions
diff --git a/Configurations/platform/Cygwin.pm b/Configurations/platform/Cygwin.pm
new file mode 100644
index 0000000000..bc62e9db40
--- /dev/null
+++ b/Configurations/platform/Cygwin.pm
@@ -0,0 +1,22 @@
+package platform::Cygwin;
+
+use strict;
+use warnings;
+use Carp;
+
+use vars qw(@ISA);
+
+require platform::mingw;
+@ISA = qw(platform::mingw);
+
+# Assume someone set @INC right before loading this module
+use configdata;
+
+sub sharedname {
+ my $class = shift;
+ my $lib = platform::mingw->sharedname(@_);
+ $lib =~ s|^lib|cyg| if defined $lib;
+ return $lib;
+}
+
+1;