summaryrefslogtreecommitdiffstats
path: root/Configurations
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-12-20 11:02:39 +0100
committerRichard Levitte <levitte@openssl.org>2017-12-27 02:18:48 +0100
commitb78eb0b697f3ba680c5c6e8576ece82ee680068b (patch)
treedaa03424408730b8cd6882e9222cec27ba3f6aae /Configurations
parentf69999262acc2e1df35c3daab0d1c55ae1c743e9 (diff)
VMS fix: link shared libs from objects files instead of from static libs
The simplifications that were made when Makefile.shared was removed didn't work quite right. Also, this is what we do on Unix and Windows anyway, so this makes us more consistent across all platforms. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4982)
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/descrip.mms.tmpl20
1 files changed, 15 insertions, 5 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index ff9d148c7f..924dd9e869 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -664,12 +664,14 @@ EOF
my $shlib = $args{shlib};
my $libd = dirname($lib);
my $libn = basename($lib);
+ my @objs = map { (my $x = $_) =~ s|\.o$|.OBJ|; $x }
+ grep { $_ =~ m|\.o$| }
+ @{$args{objs}};
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 $shlib_target = $disabled{shared} ? "" : $target{shared_target};
- my $shared_def = join(",", map { "$_/OPT" } @defs);
my $translatesyms_pl = abs2rel(rel2abs(catfile($config{sourcedir},
"VMS", "translatesyms.pl")),
rel2abs($config{builddir}));
@@ -677,7 +679,11 @@ EOF
# previous line's file spec as default, so if no directory spec
# is present in the current line and the previous line has one that
# doesn't apply, you're in for a surprise.
- my $write_opt =
+ my $write_opt1 =
+ join(",-\"\n\t", map { my $x = $_ =~ /\[/ ? $_ : "[]".$_;
+ "WRITE OPT_FILE \"$x" } @objs).
+ "\"";
+ my $write_opt2 =
join("\n\t", map { my $x = $_ =~ /\[/ ? $_ : "[]".$_;
$x =~ s|(\.EXE)|$1/SHARE|;
$x =~ s|(\.OLB)|$1/LIB|;
@@ -686,9 +692,13 @@ EOF
return <<"EOF"
$shlib.EXE : $lib.OLB $deps
\$(PERL) $translatesyms_pl \$(BLDDIR)CXX\$DEMANGLER_DB. < $defs[0] > $defs[0]-translated
- LINK \$(LDFLAGS)/SHARE=\$\@ $defs[0]-translated/OPT,$lib.OLB/LIBRARY
- \$(EX_LIBS)
- DELETE $defs[0]-translated;*
+ OPEN/WRITE/SHARE=READ OPT_FILE $lib-components.OPT
+ $write_opt1
+ $write_opt2
+ CLOSE OPT_FILE
+ LINK \$(LDFLAGS)/SHARE=\$\@ $defs[0]-translated/OPT,-
+ $lib-components.OPT/OPT \$(EX_LIBS)
+ DELETE $defs[0]-translated;*,$lib-components.OPT;*
PURGE $shlib.EXE,$shlib.MAP
EOF
. ($config{target} =~ m|alpha| ? "" : <<"EOF"