Loading util/fipsas.pl +32 −9 Original line number Diff line number Diff line Loading @@ -9,6 +9,14 @@ my @ARGS = @ARGV; my $top = shift @ARGS; my $target = shift @ARGS; my $runasm = 1; if ($ARGS[0] eq "norunasm") { $runasm = 0; shift @ARGS; } # HACK to disable operation if no OPENSSL_FIPSSYMS option. # will go away when tested more fully. Loading @@ -16,12 +24,13 @@ my $enabled = 0; foreach (@ARGS) { $enabled = 1 if /-DOPENSSL_FIPSSYMS/ ; } if ($enabled == 0) if ($enabled == 0 && $runasm) { system @ARGS; exit $? } # Open symbol rename file. open(IN, "$top/fips/fipssyms.h") || die "Can't open fipssyms.h"; Loading Loading @@ -53,10 +62,15 @@ while (<IN>) { while (($from, $to) = each %edits) { s/(\b)$from(\b)/$1$to$2/g; s/(\b_*)$from(\b)/$1$to$2/g; } print OUT $_; } close OUT; if ($runasm) { # run assembler system @ARGS; Loading @@ -67,4 +81,13 @@ unlink $target; rename "tmptarg.s", $target; die "Error executing assembler!" if $rv != 0; } else { # Don't care about target unlink "tmptarg.s"; } util/mk1mf.pl +6 −2 Original line number Diff line number Diff line Loading @@ -1163,10 +1163,14 @@ sub perlasm_compile_target { my($target,$source,$bname)=@_; my($ret); $bname =~ s/(.*)\.[^\.]$/$1/; $ret ="\$(TMP_D)$o$bname.asm: $source\n"; $ret.="\t\$(PERL) $source $asmtype \$(CFLAG) >\$\@\n\n"; $ret.="\t\$(PERL) $source $asmtype \$(CFLAG) >\$\@\n"; if ($cflags =~ /-DOPENSSL_FIPSSYMS/) { $ret .= "\t\$(PERL) util\\fipsas.pl . \$@ norunasm \$(CFLAG)\n"; } $ret .= "\n"; $ret.="$target: \$(TMP_D)$o$bname.asm\n"; $ret.="\t\$(ASM) $afile\$\@ \$(TMP_D)$o$bname.asm\n\n"; return($ret); Loading Loading
util/fipsas.pl +32 −9 Original line number Diff line number Diff line Loading @@ -9,6 +9,14 @@ my @ARGS = @ARGV; my $top = shift @ARGS; my $target = shift @ARGS; my $runasm = 1; if ($ARGS[0] eq "norunasm") { $runasm = 0; shift @ARGS; } # HACK to disable operation if no OPENSSL_FIPSSYMS option. # will go away when tested more fully. Loading @@ -16,12 +24,13 @@ my $enabled = 0; foreach (@ARGS) { $enabled = 1 if /-DOPENSSL_FIPSSYMS/ ; } if ($enabled == 0) if ($enabled == 0 && $runasm) { system @ARGS; exit $? } # Open symbol rename file. open(IN, "$top/fips/fipssyms.h") || die "Can't open fipssyms.h"; Loading Loading @@ -53,10 +62,15 @@ while (<IN>) { while (($from, $to) = each %edits) { s/(\b)$from(\b)/$1$to$2/g; s/(\b_*)$from(\b)/$1$to$2/g; } print OUT $_; } close OUT; if ($runasm) { # run assembler system @ARGS; Loading @@ -67,4 +81,13 @@ unlink $target; rename "tmptarg.s", $target; die "Error executing assembler!" if $rv != 0; } else { # Don't care about target unlink "tmptarg.s"; }
util/mk1mf.pl +6 −2 Original line number Diff line number Diff line Loading @@ -1163,10 +1163,14 @@ sub perlasm_compile_target { my($target,$source,$bname)=@_; my($ret); $bname =~ s/(.*)\.[^\.]$/$1/; $ret ="\$(TMP_D)$o$bname.asm: $source\n"; $ret.="\t\$(PERL) $source $asmtype \$(CFLAG) >\$\@\n\n"; $ret.="\t\$(PERL) $source $asmtype \$(CFLAG) >\$\@\n"; if ($cflags =~ /-DOPENSSL_FIPSSYMS/) { $ret .= "\t\$(PERL) util\\fipsas.pl . \$@ norunasm \$(CFLAG)\n"; } $ret .= "\n"; $ret.="$target: \$(TMP_D)$o$bname.asm\n"; $ret.="\t\$(ASM) $afile\$\@ \$(TMP_D)$o$bname.asm\n\n"; return($ret); Loading