mirror of https://github.com/openssl/openssl.git
				
				
				
			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)
This commit is contained in:
		
							parent
							
								
									72962d025f
								
							
						
					
					
						commit
						d88736df4d
					
				|  | @ -846,9 +846,15 @@ EOF | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   sub src2obj { |   sub src2obj { | ||||||
|  |       my $asmext = platform->asmext(); | ||||||
|       my %args = @_; |       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 $obj = platform->obj($args{obj}); | ||||||
|  |       my $dep = platform->dep($args{obj}); | ||||||
|       my $deps = join(", -\n\t\t", @srcs, @{$args{deps}}); |       my $deps = join(", -\n\t\t", @srcs, @{$args{deps}}); | ||||||
| 
 | 
 | ||||||
|       # Because VMS C isn't very good at combining a /INCLUDE path with |       # 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 $forward = dirname($args{srcs}->[0]); | ||||||
|       my $backward = abs2rel(rel2abs("."), rel2abs($forward)); |       my $backward = abs2rel(rel2abs("."), rel2abs($forward)); | ||||||
|       my $objd = abs2rel(rel2abs(dirname($obj)), 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 = |       my $srcs = | ||||||
|           join(", ", map { abs2rel(rel2abs($_), rel2abs($forward)) } @srcs); |           join(", ", map { abs2rel(rel2abs($_), rel2abs($forward)) } @srcs); | ||||||
|       my $before = $unified_info{before}->{$obj} || "\@ !"; |       my $before = $unified_info{before}->{$obj} || "\@ !"; | ||||||
|       my $after = $unified_info{after}->{$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; |       my $cflags; | ||||||
|       if ($args{attrs}->{noinst}) { |       if ($args{attrs}->{noinst}) { | ||||||
|           $cflags = { shlib => '$(NO_INST_LIB_CFLAGS)', |           $cflags = { shlib => '$(NO_INST_LIB_CFLAGS)', | ||||||
|  | @ -914,37 +908,37 @@ EOF | ||||||
|       my $incs_on = join("\n\t\@ ", @{$incs_cmds[0]}) || '!'; |       my $incs_on = join("\n\t\@ ", @{$incs_cmds[0]}) || '!'; | ||||||
|       my $incs_off = join("\n\t\@ ", @{$incs_cmds[1]}) || '!'; |       my $incs_off = join("\n\t\@ ", @{$incs_cmds[1]}) || '!'; | ||||||
| 
 | 
 | ||||||
|       if ($srcs[0] =~ /\.asm$/) { |       if ($srcs[0] =~ /\Q${asmext}\E$/) { | ||||||
|           return <<"EOF"; |           return <<"EOF"; | ||||||
| $obj.OBJ : $deps | $obj : $deps | ||||||
|         ${before} |         ${before} | ||||||
|         SET DEFAULT $forward |         SET DEFAULT $forward | ||||||
|         \$(AS) $asflags \$(ASOUTFLAG)${objd}${objn}.OBJ $srcs |         \$(AS) $asflags \$(ASOUTFLAG)${objd}${objn} $srcs | ||||||
|         SET DEFAULT $backward |         SET DEFAULT $backward | ||||||
|         ${after} |         ${after} | ||||||
|         - PURGE $obj.OBJ |         - PURGE $obj | ||||||
| EOF | EOF | ||||||
|       } elsif ($srcs[0] =~ /.S$/) { |       } elsif ($srcs[0] =~ /.S$/) { | ||||||
|          return <<"EOF"; |          return <<"EOF"; | ||||||
| $obj.OBJ : $deps | $obj : $deps | ||||||
|         ${before} |         ${before} | ||||||
|         SET DEFAULT $forward |         SET DEFAULT $forward | ||||||
|         \@ $incs_on |         \@ $incs_on | ||||||
|         \@ extradefines = "$defs" |         \@ extradefines = "$defs" | ||||||
|         PIPE \$(CPP) ${cflags} $srcs | - |         PIPE \$(CPP) ${cflags} $srcs | - | ||||||
|              \$(PERL) -ne "/^#(\\s*line)?\\s*[0-9]+\\s+""/ or print" - |              \$(PERL) -ne "/^#(\\s*line)?\\s*[0-9]+\\s+""/ or print" - | ||||||
|              > ${objd}${objn}.asm |              > ${objd}${objn}-asm | ||||||
|         \@ DELETE/SYMBOL/LOCAL extradefines |         \@ DELETE/SYMBOL/LOCAL extradefines | ||||||
|         \@ $incs_off |         \@ $incs_off | ||||||
|         SET DEFAULT $backward |         SET DEFAULT $backward | ||||||
|         ${after} |         ${after} | ||||||
|         \$(AS) $asflags \$(ASOUTFLAG)$obj.OBJ $obj.asm |         \$(AS) $asflags \$(ASOUTFLAG)$obj $obj-asm | ||||||
|         - PURGE $obj.OBJ |         - PURGE $obj | ||||||
| EOF | EOF | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       my $depbuild = $disabled{makedepend} ? "" |       my $depbuild = $disabled{makedepend} ? "" | ||||||
|           : " /MMS=(FILE=${objd}${objn}.D,TARGET=$obj)"; |           : " /MMS=(FILE=${depd}${depn},TARGET=$obj)"; | ||||||
| 
 | 
 | ||||||
|       return <<"EOF"; |       return <<"EOF"; | ||||||
| $obj : $deps | $obj : $deps | ||||||
|  | @ -952,7 +946,7 @@ $obj : $deps | ||||||
|         SET DEFAULT $forward |         SET DEFAULT $forward | ||||||
|         \@ $incs_on |         \@ $incs_on | ||||||
|         \@ extradefines = "$defs" |         \@ 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 |         \@ DELETE/SYMBOL/LOCAL extradefines | ||||||
|         \@ $incs_off |         \@ $incs_off | ||||||
|         SET DEFAULT $backward |         SET DEFAULT $backward | ||||||
|  |  | ||||||
|  | @ -601,8 +601,13 @@ EOF | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  sub src2obj { |  sub src2obj { | ||||||
|  |      my $asmext = platform->asmext(); | ||||||
|      my %args = @_; |      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 $srcs = '"'.join('" "',  @srcs).'"'; |      my $srcs = '"'.join('" "',  @srcs).'"'; | ||||||
|      my $deps = '"'.join('" "', @srcs, @{$args{deps}}).'"'; |      my $deps = '"'.join('" "', @srcs, @{$args{deps}}).'"'; | ||||||
|      my $incs = join("", map { ' /I "'.$_.'"' } @{$args{incs}}); |      my $incs = join("", map { ' /I "'.$_.'"' } @{$args{incs}}); | ||||||
|  | @ -630,7 +635,7 @@ EOF | ||||||
|      } |      } | ||||||
|      my $obj = platform->obj($args{obj}); |      my $obj = platform->obj($args{obj}); | ||||||
|      my $dep = platform->dep($args{obj}); |      my $dep = platform->dep($args{obj}); | ||||||
|      if ($srcs[0] =~ /\.asm$/) { |      if ($srcs[0] =~ /\Q${asmext}\E$/) { | ||||||
|          return <<"EOF"; |          return <<"EOF"; | ||||||
| $obj: $deps | $obj: $deps | ||||||
| 	\$(AS) $asflags \$(ASOUTFLAG)\$\@ $srcs | 	\$(AS) $asflags \$(ASOUTFLAG)\$\@ $srcs | ||||||
|  |  | ||||||
|  | @ -161,7 +161,14 @@ struct ossl_param_st { | ||||||
| typedef int (OSSL_provider_init_fn)(const OSSL_PROVIDER *provider, | typedef int (OSSL_provider_init_fn)(const OSSL_PROVIDER *provider, | ||||||
|                                     const OSSL_DISPATCH *in, |                                     const OSSL_DISPATCH *in, | ||||||
|                                     const OSSL_DISPATCH **out); |                                     const OSSL_DISPATCH **out); | ||||||
|  | # ifdef __VMS | ||||||
|  | #  pragma names save | ||||||
|  | #  pragma names uppercase,truncated | ||||||
|  | # endif | ||||||
| extern OSSL_provider_init_fn OSSL_provider_init; | extern OSSL_provider_init_fn OSSL_provider_init; | ||||||
|  | # ifdef __VMS | ||||||
|  | #  pragma names restore | ||||||
|  | # endif | ||||||
| 
 | 
 | ||||||
| # ifdef __cplusplus | # ifdef __cplusplus | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue