From 3bcfb76e4586648e550c92fa0d83e2216d5e075a Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 3 Feb 2010 13:29:14 +0000 Subject: [PATCH] small asmconv cleanups. - put asmconv in /usr/bin so it can be invoked without absolute path - make it ignore .end in gnu output mode so that it can be invoked without '|| true' in the gnu lib makefiles and it doesn't produce the messy error message --- commands/i386/acd.descr | 2 +- commands/i386/asmconv/Makefile | 4 ++-- commands/i386/asmconv/emit_gnu.c | 3 +++ commands/scripts/binsizes.sh | 2 +- lib/generate.sh | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/commands/i386/acd.descr b/commands/i386/acd.descr index 0d3d1c73b..36593e314 100644 --- a/commands/i386/acd.descr +++ b/commands/i386/acd.descr @@ -36,7 +36,7 @@ ACK_CG = $A/$ARCH/cg ACK_AS = $A/$ARCH/as \- ACK_LED = $A/em_led -a0:$W -a1:$W -a2:$W -a3:$W ACK_CV = $A/cv -ASMCONV = $L/asmconv +ASMCONV = /usr/bin/asmconv AAL = /usr/bin/aal # Minix predefined symbols. diff --git a/commands/i386/asmconv/Makefile b/commands/i386/asmconv/Makefile index 29f81b3fa..3c9995191 100644 --- a/commands/i386/asmconv/Makefile +++ b/commands/i386/asmconv/Makefile @@ -13,9 +13,9 @@ asmconv: $(OBJ) $(CC) $(LDFLAGS) -o $@ $(OBJ) install -S 8kw $@ -install: /usr/lib/asmconv +install: /usr/bin/asmconv -/usr/lib/asmconv: asmconv +/usr/bin/asmconv: asmconv install -cs -o bin asmconv $@ clean: diff --git a/commands/i386/asmconv/emit_gnu.c b/commands/i386/asmconv/emit_gnu.c index 54726be4c..ba8c148bf 100644 --- a/commands/i386/asmconv/emit_gnu.c +++ b/commands/i386/asmconv/emit_gnu.c @@ -506,6 +506,9 @@ void gnu_emit_instruction(asm86_t *a) } } + if (a->opcode == DOT_END) { + /* Ignore .end in gnu mode. */ + } else if (a->opcode == DOT_LABEL) { assert(a->args->operator == ':'); gnu_printf("%s:", a->args->name); diff --git a/commands/scripts/binsizes.sh b/commands/scripts/binsizes.sh index a471b0ac1..dcc3faa53 100644 --- a/commands/scripts/binsizes.sh +++ b/commands/scripts/binsizes.sh @@ -13,7 +13,7 @@ if [ "$1" != normal ] then t=$t.$1 fi -chmem =250000 /usr/lib/em_* /usr/lib/cpp* /usr/lib/cv /usr/lib/asmconv >/dev/null 2>&1 +chmem =250000 /usr/lib/em_* /usr/lib/cpp* /usr/lib/cv >/dev/null 2>&1 chmem =600000 /usr/lib/ego/* >/dev/null 2>&1 if [ -f $t ] then cat "$t" | while read line diff --git a/lib/generate.sh b/lib/generate.sh index f520a32e7..887ec3c75 100644 --- a/lib/generate.sh +++ b/lib/generate.sh @@ -133,7 +133,7 @@ gnuCommands() case $srcfile in *.s ) - echo " gcc $CFLAGS -E -x assembler-with-cpp -I. $srcfile | asmconv -mi386 ack gnu > $GNUBASE/$OBJDIR/$srcfile.gnu || true" + echo " gcc $CFLAGS -E -x assembler-with-cpp -I. $srcfile | asmconv -mi386 ack gnu > $GNUBASE/$OBJDIR/$srcfile.gnu" echo " gas -o $dstfile $GNUBASE/$OBJDIR/$srcfile.gnu" echo " mkdep 'gcc $CFLAGS -E -x assembler-with-cpp -I.' $srcfile | $sedcmd >> .depend-gnu" >&4