OpenBSD fix-up for new a.out targets. OpenBSD .s.o rule is busted...

This commit is contained in:
Andy Polyakov 2004-08-01 21:16:26 +00:00
parent ec38ddc765
commit 34413fca84
11 changed files with 50 additions and 71 deletions

View File

@ -67,8 +67,8 @@ x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
$(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
$(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
x86cpuid-out.s: x86cpuid.pl perlasm/x86asm.pl
$(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) > $@
x86cpuid-out.o: x86cpuid.pl perlasm/x86asm.pl
$(PERL) x86cpuid.pl a.out $(CFLAGS) $(PROCESSOR) | as -o $@
amd64cpuid.s: amd64cpuid.pl
$(PERL) amd64cpuid.pl $@

View File

@ -56,8 +56,8 @@ asm/bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
asm/bx86-cof.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) bf-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
# a.out
asm/bx86-out.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) bf-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
asm/bx86-out.o: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) bf-586.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
@ -93,7 +93,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/bx86unix.cpp asm/*-[elf|cof|out].* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
rm -f asm/bx86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -78,10 +78,10 @@ asm/bn86-cof.s: asm/bn-586.pl ../perlasm/x86asm.pl
asm/co86-cof.s: asm/co-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) co-586.pl coff $(CFLAGS) > ../$@)
# a.out
asm/bn86-out.s: asm/bn-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) bn-586.pl a.out $(CFLAGS) > ../$@)
asm/co86-out.s: asm/co-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) co-586.pl a.out $(CFLAGS) > ../$@)
asm/bn86-out.o: asm/bn-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) bn-586.pl a.out $(CFLAGS) | as -o ../$@)
asm/co86-out.o: asm/co-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) co-586.pl a.out $(CFLAGS) | as -o ../$@)
asm/sparcv8.o: asm/sparcv8.S
@ -146,7 +146,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-[elf|cof|out].* asm/ia64.[so] *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* asm/*-cof.* asm/*-out.* asm/ia64.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -59,8 +59,8 @@ asm/cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
asm/cx86-cof.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) cast-586.pl coff $(CLAGS) $(PROCESSOR) > ../$@)
# a.out
asm/cx86-out.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) cast-586.pl a.out $(CLAGS) $(PROCESSOR) > ../$@)
asm/cx86-out.o: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) cast-586.pl a.out $(CLAGS) $(PROCESSOR) | as -o ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
@ -94,7 +94,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/cx86unix.cpp asm/*-[elf|cof|out].* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
rm -f asm/cx86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -80,31 +80,10 @@ asm/dx86-cof.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
asm/yx86-cof.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) crypt586.pl coff $(CFLAGS) > ../$@)
# a.out
asm/dx86-out.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) des-586.pl a.out $(CFLAGS) > ../$@)
asm/yx86-out.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) crypt586.pl a.out $(CFLAGS) > ../$@)
# a.out
asm/dx86-out.o: asm/dx86unix.cpp
$(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o
asm/yx86-out.o: asm/yx86unix.cpp
$(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o
# bsdi
asm/dx86bsdi.o: asm/dx86unix.cpp
$(CPP) -DBSDI asm/dx86unix.cpp | sed 's/ :/:/' | as -o asm/dx86bsdi.o
asm/yx86bsdi.o: asm/yx86unix.cpp
$(CPP) -DBSDI asm/yx86unix.cpp | sed 's/ :/:/' | as -o asm/yx86bsdi.o
asm/dx86unix.cpp: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) des-586.pl cpp >dx86unix.cpp)
asm/yx86unix.cpp: asm/crypt586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp)
asm/dx86-out.o: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) des-586.pl a.out $(CFLAGS) | as -o ../$@)
asm/yx86-out.o: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) crypt586.pl a.out $(CFLAGS) | as -o ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
@ -140,7 +119,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*-[elf|cof|out].* *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*.s *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -54,8 +54,8 @@ asm/mx86-elf.s: asm/md5-586.pl ../perlasm/x86asm.pl
asm/mx86-cof.s: asm/md5-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) md5-586.pl coff $(CFLAGS) > ../$@)
# a.out
asm/mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
asm/mx86-out.o: asm/md5-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) | as -o ../$@)
asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
$(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
@ -107,7 +107,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/mx86unix.cpp asm/*-[elf|cof|out].* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
rm -f asm/mx86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -8,6 +8,7 @@ $constl=0;
$align=($main'aout)?"4":"16";
$under=($main'aout or $main'coff)?"_":"";
$dot=($main'aout)?"":".";
$com_start="#" if ($main'aout or $main'coff);
sub main'asm_init_output { @out=(); }
@ -193,7 +194,7 @@ sub main'pop { &out1("popl",@_); $stack-=4; }
sub main'pushf { &out0("pushf"); $stack+=4; }
sub main'popf { &out0("popf"); $stack-=4; }
sub main'not { &out1("notl",@_); }
sub main'call { &out1("call",($_[0]=~/^\.L/?'':$under).$_[0]); }
sub main'call { &out1("call",($_[0]=~/^\Q${dot}\EL/?'':$under).$_[0]); }
sub main'ret { &out0("ret"); }
sub main'nop { &out0("nop"); }
sub main'test { &out2("testl",@_); }
@ -394,15 +395,15 @@ sub main'function_end
popl %ebx
popl %ebp
ret
.L_${func}_end:
${dot}L_${func}_end:
EOF
push(@out,$tmp);
if ($main'cpp)
{ push(@out,"SIZE($func,.L_${func}_end-$func)\n"); }
{ push(@out,"SIZE($func,${dot}L_${func}_end-$func)\n"); }
elsif ($main'coff or $main'aout)
{ $tmp=push(@out,".align $align\n"); }
else { push(@out,".size\t$func,.L_${func}_end-$func\n"); }
else { push(@out,".size\t$func,${dot}L_${func}_end-$func\n"); }
push(@out,".ident \"$func\"\n");
$stack=0;
%label=();
@ -428,12 +429,12 @@ sub main'function_end_B
$func=$under.$func;
push(@out,".L_${func}_end:\n");
push(@out,"${dot}L_${func}_end:\n");
if ($main'cpp)
{ push(@out,"SIZE($func,.L_${func}_end-$func)\n"); }
{ push(@out,"SIZE($func,${dot}L_${func}_end-$func)\n"); }
elsif ($main'coff or $main'aout)
{ push(@out,".align $align\n"); }
else { push(@out,".size\t$func,.L_${func}_end-$func\n"); }
else { push(@out,".size\t$func,${dot}L_${func}_end-$func\n"); }
push(@out,".ident \"$func\"\n");
$stack=0;
%label=();
@ -475,10 +476,10 @@ sub main'swtmp
sub main'comment
{
return if (!defined($com_start);
if ($main'elf) # GNU and SVR4 as'es use different comment delimiters,
{ # so we just skip comments...
push(@out,"\n");
if (!defined($com_start) or $main'elf)
{ # Regarding $main'elf above...
# GNU and SVR4 as'es use different comment delimiters,
push(@out,"\n"); # so we just skip ELF comments...
return;
}
foreach (@_)
@ -494,7 +495,7 @@ sub main'label
{
if (!defined($label{$_[0]}))
{
$label{$_[0]}=".${label}${_[0]}";
$label{$_[0]}="${dot}${label}${_[0]}";
$label++;
}
return($label{$_[0]});
@ -504,7 +505,7 @@ sub main'set_label
{
if (!defined($label{$_[0]}))
{
$label{$_[0]}=".${label}${_[0]}";
$label{$_[0]}="${dot}${label}${_[0]}";
$label++;
}
push(@out,".align $align\n") if ($_[1] != 0);
@ -662,7 +663,6 @@ sub main'picmeup
{
local($tmp)=<<___;
#if (defined(ELF) || defined(SOL)) && defined(PIC)
.align 4
call 1f
1: popl $regs{$dst}
addl \$_GLOBAL_OFFSET_TABLE_+[.-1b],$regs{$dst}
@ -680,7 +680,7 @@ ___
&main'blindpop($dst);
&main'add($dst,"\$$under"."_GLOBAL_OFFSET_TABLE_+[.-".
&main'label("PIC_me_up") . "]");
&main'mov($dst,&main'DWP($sym."\@GOT",$dst));
&main'mov($dst,&main'DWP("$under".$sym."\@GOT",$dst));
}
else
{

View File

@ -59,8 +59,8 @@ asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
asm/rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@)
# a.out
asm/rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
asm/rx86-out.o: asm/rc4-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) | as -o ../$@)
asm/rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) $< $@
@ -96,7 +96,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/rx86unix.cpp asm/*-[elf|cof|out].* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
rm -f asm/rx86unix.cpp asm/*.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -56,8 +56,8 @@ asm/r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
asm/r586-cof.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) rc5-586.pl coff $(CFLAGS) > ../$@)
# a.out
asm/r586-out.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) rc5-586.pl a.out $(CFLAGS) > ../$@)
asm/r586-out.o: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
(cd asm; $(PERL) rc5-586.pl a.out $(CFLAGS) | as -o ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
@ -91,7 +91,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/r586unix.cpp asm/*-[elf|cof|out].* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
rm -f asm/r586unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -54,8 +54,8 @@ asm/rm86-elf.s: asm/rmd-586.pl ../perlasm/x86asm.pl
asm/rm86-cof.s: asm/rmd-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rmd-586.pl coff $(CFLAGS) > ../$@)
# a.out
asm/rm86-out.s: asm/rmd-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rmd-586.pl a.out $(CFLAGS) > ../$@)
asm/rm86-out.o: asm/rmd-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) rmd-586.pl a.out $(CFLAGS) | as -o ../$@)
files:
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
@ -89,7 +89,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/rm86unix.cpp asm/*-[elf|cof|out].* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
rm -f asm/rm86unix.cpp asm/*.s *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -58,10 +58,10 @@ asm/sx86-cof.s: asm/sha1-586.pl ../perlasm/x86asm.pl
asm/s512sse2-cof.s: asm/sha512-sse2.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) sha512-sse2.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
# a.out
asm/sx86-out.s: asm/sha1-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
asm/s512sse2-out.s: asm/sha512-sse2.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
asm/sx86-out.o: asm/sha1-586.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
asm/s512sse2-out.o: asm/sha512-sse2.pl ../perlasm/x86asm.pl
(cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
asm/sha256-ia64.s: asm/sha512-ia64.pl
(cd asm; $(PERL) sha512-ia64.pl $@ $(CFLAGS))
@ -100,7 +100,7 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f asm/sx86unix.cpp asm/*.[so] *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
rm -f asm/sx86unix.cpp asm/*.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
# DO NOT DELETE THIS LINE -- make depend depends on it.