summaryrefslogtreecommitdiffstats
path: root/Configurations
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2022-10-05 12:47:32 +0200
committerTomas Mraz <tomas@openssl.org>2022-11-21 10:49:52 +0100
commit01c7d59f0358ec6cf3dd45012a2dc8abee670f3e (patch)
treebabcc5b5667489f609d463b01258074797dfce6f /Configurations
parent81bfb11b8d6fae64f0476ec8309903b216a89247 (diff)
VMS: For executables, process the use of /INCLUDE=main a bit differently
The way it was implemented didn't play well with perl's join(), so it's reimplemented a bit differently. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19347) (cherry picked from commit 1ec0acf264652bd981e95842723e5414d634cd93)
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/descrip.mms.tmpl19
1 files changed, 11 insertions, 8 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index dceaded860..ed8646e9f4 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -1324,14 +1324,15 @@ EOF
(map { my $x = $_ =~ /\[/ ? $_ : "[]".$_;
"\@ WRITE OPT_FILE \"$x" } @objs),
(map { my $x = ($_->{lib} =~ /\[/) ? $_->{lib} : "[]".$_->{lib};
- # Special hack to include the MAIN object
- # module explicitly. This will only be done
- # if there isn't a 'main' in the program's
- # object modules already.
- my $main = $_->{attrs}->{has_main}
- ? '/INCLUDE=main' : '';
- ( "\@ IF nomain THEN WRITE OPT_FILE \"$x/LIB$main",
- "\@ IF .NOT. nomain THEN WRITE OPT_FILE \"$x/LIB" ) }
+ # Special hack to include the MAIN object module
+ # explicitly, if it's known that there is one.
+ # |incmain| is defined in the rule generation further
+ # down, with the necessary /INCLUDE=main option unless
+ # the program has been determined to have a main function
+ # already.
+ $_->{attrs}->{has_main}
+ ? "\@ WRITE OPT_FILE \"$x/LIB''incmain'"
+ : "\@ WRITE OPT_FILE \"$x/LIB" }
grep { $_->{lib} =~ m|\.OLB$| }
@deps))
."\"";
@@ -1363,6 +1364,8 @@ EOF
return <<"EOF"
$bin : $deps
$analyse_objs
+ @ incmain = "/INCLUDE=main"
+ @ IF .NOT. nomain THEN incmain = ""
@ OPEN/WRITE/SHARE=READ OPT_FILE $binname.OPT
$write_opt1
$write_opt2