VMS: stop trying to build shared libraries from static ones
authorRichard Levitte <levitte@openssl.org>
Wed, 12 Sep 2018 08:59:06 +0000 (10:59 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 12 Sep 2018 22:41:21 +0000 (00:41 +0200)
The possibility to do this was killed when we started producing object
file names with encoded intention (and possibly different builds), and
leads to build errors.

With that, 'libobj2shlib' is renamed to 'obj2shlib' to reflect this
design change.  The old name is still used if the new one isn't
available, for the sake of backward compatibility.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7198)

Configurations/common.tmpl
Configurations/descrip.mms.tmpl
Configurations/unix-Makefile.tmpl
Configurations/windows-makefile.tmpl

index 94e49319a94d8310c9424e112e23004e7ca1976f..dffa513f22bbd4dd643772537eb4acc99c6f1387 100644 (file)
  }
 
  # dolib is responsible for building libraries.  It will call
- # libobj2shlib is shared libraries are produced, and obj2lib in all
+ # obj2shlib is shared libraries are produced, and obj2lib in all
  # cases.  It also makes sure all object files for the library are
  # built.
  sub dolib {
      my $lib = shift;
      return "" if $cache{$lib};
      unless ($disabled{shared} || $lib =~ /\.a$/) {
-         $OUT .= libobj2shlib(shlib => $unified_info{sharednames}->{$lib},
+         my $obj2shlib = defined &obj2shlib ? \&obj2shlib : \&libobj2shlib;
+         $OUT .= $obj2shlib->(shlib => $unified_info{sharednames}->{$lib},
                               lib => $lib,
                               objs => $unified_info{shared_sources}->{$lib},
                               deps => [ reducedepends(resolvedepends($lib)) ],
index f85848f01231a26003f18b4385123866db757db4..95fa521b9edd66eead1eec61ef0a4964815a72af 100644 (file)
@@ -902,7 +902,7 @@ $obj.OBJ : $deps
         - PURGE $obj.OBJ
 EOF
   }
-  sub libobj2shlib {
+  sub obj2shlib {
       my %args = @_;
       my $lib = $args{lib};
       my $shlib = $args{shlib};
@@ -914,7 +914,7 @@ EOF
       my @defs = grep { $_ =~ /\.opt$/ } @{$args{objs}};
       my @deps = compute_lib_depends(@{$args{deps}});
       die "More than one symbol vector" if scalar @defs > 1;
-      my $deps = join(", -\n\t\t", @defs, @deps);
+      my $deps = join(", -\n\t\t", @objs, @defs, @deps);
       my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
       my $translatesyms_pl = abs2rel(rel2abs(catfile($config{sourcedir},
                                                      "VMS", "translatesyms.pl")),
@@ -934,7 +934,7 @@ EOF
                              "WRITE OPT_FILE \"$x\"" } @deps)
           || "\@ !";
       return <<"EOF"
-$shlib.EXE : $lib.OLB $deps
+$shlib.EXE : $deps
         \$(PERL) $translatesyms_pl \$(BLDDIR)CXX\$DEMANGLER_DB. < $defs[0] > $defs[0]-translated
         OPEN/WRITE/SHARE=READ OPT_FILE $lib-components.OPT
         $write_opt1
index bb6755b4251fde0fefc5ce6169c44f78e6b96ea8..17f76a56547b5d54e952c4d59acccf77365b9817 100644 (file)
@@ -1085,7 +1085,7 @@ EOF
   # On Unix, we build shlibs from static libs, so we're ignoring the
   # object file array.  We *know* this routine is only called when we've
   # configure 'shared'.
-  sub libobj2shlib {
+  sub obj2shlib {
       my %args = @_;
       my $lib = $args{lib};
       my $shlib = $args{shlib};
index c8b0cf1c31126d75544303bad05bfb518e60c990..148ddf4c60e21e21c95ce9cc0ca7131263d7459b 100644 (file)
@@ -616,7 +616,7 @@ EOF
  # On Unix, we build shlibs from static libs, so we're ignoring the
  # object file array.  We *know* this routine is only called when we've
  # configure 'shared'.
- sub libobj2shlib {
+ sub obj2shlib {
      my %args = @_;
      my $lib = $args{lib};
      my $shlib = $args{shlib};