summaryrefslogtreecommitdiffstats
path: root/Configurations/descrip.mms.tmpl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-03-19 14:43:31 +0100
committerRichard Levitte <levitte@openssl.org>2019-03-29 12:52:58 +0100
commitd88736df4d19521664ebb125ff66e0d7b085a53c (patch)
tree8d4d0b80732b563c92cebc78876740acd0b90a2e /Configurations/descrip.mms.tmpl
parent72962d025f875ac35114ac090b878ee18b246144 (diff)
Windows, VMS: build fixes
The naming of generated assembler wasn't done quite right. There are assembler files that are generated from a perl script, and there are those who are not. Only the former must be renamed to the platform specific asm extension. Furthermore, we need to make sure that 'OSSL_provider_init' isn't case sensitive on VMS, to allow for the least surprise for provider builders. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8529)
Diffstat (limited to 'Configurations/descrip.mms.tmpl')
-rw-r--r--Configurations/descrip.mms.tmpl46
1 files changed, 20 insertions, 26 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index 2f74756d1a..46f2302f83 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -846,9 +846,15 @@ EOF
}
sub src2obj {
+ my $asmext = platform->asmext();
my %args = @_;
- my @srcs = map { (my $x = $_) =~ s/\.s$/.asm/; $x } ( @{$args{srcs}} );
+ my @srcs =
+ map { my $x = $_;
+ (platform->isasm($x) && grep { $x eq $_ } @generated)
+ ? platform->asm($x) : $x }
+ ( @{$args{srcs}} );
my $obj = platform->obj($args{obj});
+ my $dep = platform->dep($args{obj});
my $deps = join(", -\n\t\t", @srcs, @{$args{deps}});
# Because VMS C isn't very good at combining a /INCLUDE path with
@@ -860,26 +866,14 @@ EOF
my $forward = dirname($args{srcs}->[0]);
my $backward = abs2rel(rel2abs("."), rel2abs($forward));
my $objd = abs2rel(rel2abs(dirname($obj)), rel2abs($forward));
- my $objn = basename($obj, platform->objext());
+ my $objn = basename($obj);
+ my $depd = abs2rel(rel2abs(dirname($dep)), rel2abs($forward));
+ my $depn = basename($dep);
my $srcs =
join(", ", map { abs2rel(rel2abs($_), rel2abs($forward)) } @srcs);
my $before = $unified_info{before}->{$obj} || "\@ !";
my $after = $unified_info{after}->{$obj} || "\@ !";
- if ($srcs[0] =~ /\.asm$/) {
- my $asflags = { shlib => ' $(LIB_ASFLAGS)',
- lib => ' $(LIB_ASFLAGS)',
- dso => ' $(DSO_ASFLAGS)',
- bin => ' $(BIN_ASFLAGS)' } -> {$args{intent}};
- return <<"EOF";
-$obj : $deps
- ${before}
- SET DEFAULT $forward
- \$(AS) $asflags \$(ASOUTFLAG)${objd}${objn}.OBJ $srcs
- SET DEFAULT $backward
-EOF
- }
-
my $cflags;
if ($args{attrs}->{noinst}) {
$cflags = { shlib => '$(NO_INST_LIB_CFLAGS)',
@@ -914,37 +908,37 @@ EOF
my $incs_on = join("\n\t\@ ", @{$incs_cmds[0]}) || '!';
my $incs_off = join("\n\t\@ ", @{$incs_cmds[1]}) || '!';
- if ($srcs[0] =~ /\.asm$/) {
+ if ($srcs[0] =~ /\Q${asmext}\E$/) {
return <<"EOF";
-$obj.OBJ : $deps
+$obj : $deps
${before}
SET DEFAULT $forward
- \$(AS) $asflags \$(ASOUTFLAG)${objd}${objn}.OBJ $srcs
+ \$(AS) $asflags \$(ASOUTFLAG)${objd}${objn} $srcs
SET DEFAULT $backward
${after}
- - PURGE $obj.OBJ
+ - PURGE $obj
EOF
} elsif ($srcs[0] =~ /.S$/) {
return <<"EOF";
-$obj.OBJ : $deps
+$obj : $deps
${before}
SET DEFAULT $forward
\@ $incs_on
\@ extradefines = "$defs"
PIPE \$(CPP) ${cflags} $srcs | -
\$(PERL) -ne "/^#(\\s*line)?\\s*[0-9]+\\s+""/ or print" -
- > ${objd}${objn}.asm
+ > ${objd}${objn}-asm
\@ DELETE/SYMBOL/LOCAL extradefines
\@ $incs_off
SET DEFAULT $backward
${after}
- \$(AS) $asflags \$(ASOUTFLAG)$obj.OBJ $obj.asm
- - PURGE $obj.OBJ
+ \$(AS) $asflags \$(ASOUTFLAG)$obj $obj-asm
+ - PURGE $obj
EOF
}
my $depbuild = $disabled{makedepend} ? ""
- : " /MMS=(FILE=${objd}${objn}.D,TARGET=$obj)";
+ : " /MMS=(FILE=${depd}${depn},TARGET=$obj)";
return <<"EOF";
$obj : $deps
@@ -952,7 +946,7 @@ $obj : $deps
SET DEFAULT $forward
\@ $incs_on
\@ extradefines = "$defs"
- \$(CC) ${cflags}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
+ \$(CC) ${cflags}${depbuild} /OBJECT=${objd}${objn} /REPOSITORY=$backward $srcs
\@ DELETE/SYMBOL/LOCAL extradefines
\@ $incs_off
SET DEFAULT $backward