X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Configurations%2Fdescrip.mms.tmpl;h=5b4b10943d5d78fee5cd14377b60c46ee9be4c3c;hp=5a6e8d1d480d901366d24143b9a196f3ea01618b;hb=19eaee749d3b460246d9feadea350b22fa329f03;hpb=5a5b85d125795d9257876aee266e5b65875fae03 diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index 5a6e8d1d48..5b4b10943d 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -157,12 +157,12 @@ CFLAGS_Q=$(CFLAGS) DEPFLAG= /DEFINE=({- join(",", @{$config{depdefines}}) -}) LDFLAGS= {- $target{lflags} -} EX_LIBS= {- $target{ex_libs} ? ",".$target{ex_libs} : "" -}{- $config{ex_libs} ? ",".$config{ex_libs} : "" -} -LIB_CFLAGS={- $target{lib_cflags} || "" -} -DSO_CFLAGS={- $target{dso_cflags} || "" -} -BIN_CFLAGS={- $target{bin_cflags} || "" -} -NO_INST_LIB_CFLAGS={- $target{no_inst_lib_cflags} || '$(LIB_CFLAGS)' -} -NO_INST_DSO_CFLAGS={- $target{no_inst_dso_cflags} || '$(DSO_CFLAGS)' -} -NO_INST_BIN_CFLAGS={- $target{no_inst_bin_cflags} || '$(BIN_CFLAGS)' -} +LIB_CFLAGS={- $target{lib_cflags} // "" -} +DSO_CFLAGS={- $target{dso_cflags} // "" -} +BIN_CFLAGS={- $target{bin_cflags} // "" -} +NO_INST_LIB_CFLAGS={- $target{no_inst_lib_cflags} // '$(LIB_CFLAGS)' -} +NO_INST_DSO_CFLAGS={- $target{no_inst_dso_cflags} // '$(DSO_CFLAGS)' -} +NO_INST_BIN_CFLAGS={- $target{no_inst_bin_cflags} // '$(BIN_CFLAGS)' -} PERL={- $config{perl} -} @@ -525,6 +525,17 @@ configdata.pm : $(SRCDIR)Configure $(SRCDIR)config.com {- join(" ", @{$config{bu use File::Basename; use File::Spec::Functions qw/abs2rel rel2abs catfile catdir/; + # Helper function to figure out dependencies on libraries + # It takes a list of library names and outputs a list of dependencies + sub compute_lib_depends { + if ($disabled{shared}) { + return map { $_ =~ /\.a$/ ? $`.".OLB" : $_.".OLB" } @_; + } + return map { $_ =~ /\.a$/ + ? $`.".OLB" + : $unified_info{sharednames}->{$_}.".EXE" } @_; + } + sub generatesrc { my %args = @_; my $generator = join(" ", @{$args{generator}}); @@ -627,9 +638,7 @@ EOF my $libd = dirname($lib); my $libn = basename($lib); (my $mkdef_key = $libn) =~ s/^${osslprefix_q}lib([^0-9]*)\d*/$1/i; - my @deps = map { - $disabled{shared} ? $_.".OLB" - : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}}; + my @deps = compute_lib_depends(@{$args{deps}}); my $deps = join(", -\n\t\t", @deps); my $shlib_target = $disabled{shared} ? "" : $target{shared_target}; my $ordinalsfile = defined($args{ordinals}) ? $args{ordinals}->[1] : ""; @@ -652,7 +661,7 @@ EOF $x =~ s|(\.OLB)|$1/LIB|; "WRITE OPT_FILE \"$x\"" } @deps) || "\@ !"; - return <<"EOF"; + return <<"EOF" $shlib.EXE : $lib.OLB $deps $ordinalsfile \$(PERL) $mkdef_pl "$mkdef_key" "VMS" > $shlib.SYMVEC-tmp \$(PERL) $translatesyms_pl \$(BLDDIR)CXX\$DEMANGLER_DB. < $shlib.SYMVEC-tmp > $shlib.SYMVEC @@ -663,10 +672,14 @@ $shlib.EXE : $lib.OLB $deps $ordinalsfile WRITE OPT_FILE "$lib.OLB/LIBRARY" $write_opt CLOSE OPT_FILE - LINK /MAP=$shlib.MAP /FULL/SHARE=$shlib.EXE $shlib.OPT/OPT \$(EX_LIBS) + LINK \$(LDFLAGS)/SHARE=\$\@ $shlib.OPT/OPT \$(EX_LIBS) DELETE $shlib.SYMVEC;* PURGE $shlib.EXE,$shlib.OPT,$shlib.MAP EOF + . ($config{target} =~ m|alpha| ? "" : <<"EOF" + SET IMAGE/FLAGS=(NOCALL_DEBUG) \$\@ +EOF + ); } sub obj2dso { my %args = @_; @@ -675,9 +688,7 @@ EOF my $libn = basename($lib); (my $libn_nolib = $libn) =~ s/^lib//; my @objs = map { "$_.OBJ" } @{$args{objs}}; - my @deps = map { - $disabled{shared} ? $_.".OLB" - : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}}; + my @deps = compute_lib_depends(@{$args{deps}}); my $deps = join(", -\n\t\t", @objs, @deps); my $shlib_target = $disabled{shared} ? "" : $target{shared_target}; my $engine_opt = abs2rel(rel2abs(catfile($config{sourcedir}, @@ -697,16 +708,20 @@ EOF $x =~ s|(\.OLB)|$1/LIB|; "WRITE OPT_FILE \"$x\"" } @deps) || "\@ !"; - return <<"EOF"; + return <<"EOF" $lib.EXE : $deps OPEN/WRITE/SHARE=READ OPT_FILE $lib.OPT TYPE $engine_opt /OUTPUT=OPT_FILE: $write_opt1 $write_opt2 CLOSE OPT_FILE - LINK /MAP=$lib.MAP /FULL/SHARE=$lib.EXE $lib.OPT/OPT \$(EX_LIBS) + LINK \$(LDFLAGS)/SHARE=\$\@ $lib.OPT/OPT \$(EX_LIBS) - PURGE $lib.EXE,$lib.OPT,$lib.MAP EOF + . ($config{target} =~ m|alpha| ? "" : <<"EOF" + SET IMAGE/FLAGS=(NOCALL_DEBUG) \$\@ +EOF + ); } sub obj2lib { my %args = @_; @@ -727,9 +742,7 @@ EOF my $bind = dirname($bin); my $binn = basename($bin); my @objs = map { "$_.OBJ" } @{$args{objs}}; - my @deps = map { - $disabled{shared} ? $_.".OLB" - : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}}; + my @deps = compute_lib_depends(@{$args{deps}}); my $deps = join(", -\n\t\t", @objs, @deps); # The "[]" hack is because in .OPT files, each line inherits the # previous line's file spec as default, so if no directory spec @@ -763,14 +776,14 @@ EOF # by default), and so someone building doesn't have to worry where it # isn't necessary. If there are other warnings, however, we show them # and let it break the build. - return <<"EOF"; + return <<"EOF" $bin.EXE : $deps OPEN/WRITE/SHARE=READ OPT_FILE $bin.OPT $write_opt1 $write_opt2 CLOSE OPT_FILE - pipe SPAWN/WAIT/NOLOG/OUT=$bin.LINKLOG - - LINK/EXEC=$bin.EXE \$(LDFLAGS) $bin.OPT/OPT \$(EX_LIBS) ; - + LINK \$(LDFLAGS)/EXEC=\$\@ $bin.OPT/OPT \$(EX_LIBS) ; - link_status = \$status ; link_severity = link_status .AND. 7 @ search_severity = 1 -@ IF link_severity .EQ. 0 THEN - @@ -790,6 +803,10 @@ $bin.EXE : $deps @ IF .NOT. link_severity THEN SPAWN/WAIT/NOLOG EXIT 'link_status' - PURGE $bin.EXE,$bin.OPT EOF + . ($config{target} =~ m|alpha| ? "" : <<"EOF" + SET IMAGE/FLAGS=(NOCALL_DEBUG) \$\@ +EOF + ); } sub in2script { my %args = @_;