VMS: stop trying to build shared libraries from static ones

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)
This commit is contained in:
Richard Levitte 2018-09-12 10:59:06 +02:00
parent c402e943cd
commit f619622715
4 changed files with 8 additions and 7 deletions

View file

@ -116,14 +116,15 @@
}
# 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)) ],

View 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

View 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};

View 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};