From f619622715af3904ee1d6e0affd563f8ed799ff0 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 12 Sep 2018 10:59:06 +0200 Subject: [PATCH] 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 (Merged from https://github.com/openssl/openssl/pull/7198) --- Configurations/common.tmpl | 5 +++-- Configurations/descrip.mms.tmpl | 6 +++--- Configurations/unix-Makefile.tmpl | 2 +- Configurations/windows-makefile.tmpl | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl index 94e49319a9..dffa513f22 100644 --- a/Configurations/common.tmpl +++ b/Configurations/common.tmpl @@ -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)) ], diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index f85848f012..95fa521b9e 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -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 diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index bb6755b425..17f76a5654 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -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}; diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index c8b0cf1c31..148ddf4c60 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -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}; -- 2.25.1