Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amiga/stand/bootblock improve the error message if ...



details:   https://anonhg.NetBSD.org/src/rev/0b975d19afb9
branches:  trunk
changeset: 767197:0b975d19afb9
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jul 11 01:24:34 2011 +0000

description:
improve the error message if elf2bb finds we are too large.  if elf2bb
fails, make sure that the following nm -u's success doesn't cause make
to believe the target was built.  now amiga builds with HAVE_GCC=45
actually fail here, rather than fail at sets time due to missing files.

diffstat:

 sys/arch/amiga/stand/bootblock/boot/Makefile       |  6 +++---
 sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile |  6 +++---
 sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c     |  5 +++--
 3 files changed, 9 insertions(+), 8 deletions(-)

diffs (63 lines):

diff -r d64bb15f32b4 -r 0b975d19afb9 sys/arch/amiga/stand/bootblock/boot/Makefile
--- a/sys/arch/amiga/stand/bootblock/boot/Makefile      Mon Jul 11 00:46:03 2011 +0000
+++ b/sys/arch/amiga/stand/bootblock/boot/Makefile      Mon Jul 11 01:24:34 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.44 2011/01/22 19:19:15 joerg Exp $
+#      $NetBSD: Makefile,v 1.45 2011/07/11 01:24:34 mrg Exp $
 
 .include <bsd.own.mk>
 .include <bsd.sys.mk>          # for HOST_SH
@@ -98,10 +98,10 @@
 .S.o: ; ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $<
 
 boot.amiga: x.out
-       ${RELOC2BB} -S x.out $@ || ${NM} -u x.out
+       ${RELOC2BB} -S x.out $@ || ${NM} -u x.out && false
 
 x.out: xxstart.o libboot.a ${LIBZ}
-       ${LD} ${LDFLAGS} -r -dc -e _start -o $@ $>
+       ${LD} ${LDFLAGS} -r -dc -e start -o $@ $>
        ${SIZE} $@
        ${NM} -u $@
 
diff -r d64bb15f32b4 -r 0b975d19afb9 sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile
--- a/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile        Mon Jul 11 00:46:03 2011 +0000
+++ b/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile        Mon Jul 11 01:24:34 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.15 2011/01/22 19:19:16 joerg Exp $
+#      $NetBSD: Makefile,v 1.16 2011/07/11 01:24:34 mrg Exp $
 
 ### what we need:
 
@@ -73,10 +73,10 @@
 .S.o: ; ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $<
 
 bootxx_ffs: x.out
-       ${RELOC2BB} x.out $@ || ${NM} -u x.out
+       ${RELOC2BB} x.out $@ || ${NM} -u x.out && false
 
 bootxx_fd: f.out
-       ${RELOC2BB} -F f.out $@ || ${NM} -u f.out
+       ${RELOC2BB} -F f.out $@ || ${NM} -u f.out && false
 
 x.out: xxstart.o libboot.a
        ${LD} ${LDFLAGS} -r -dc -e _start -o $@ $>
diff -r d64bb15f32b4 -r 0b975d19afb9 sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c
--- a/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c    Mon Jul 11 00:46:03 2011 +0000
+++ b/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c    Mon Jul 11 01:24:34 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf2bb.c,v 1.15 2008/04/28 20:23:13 martin Exp $       */
+/*     $NetBSD: elf2bb.c,v 1.16 2011/07/11 01:24:34 mrg Exp $  */
 
 /*-
  * Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
@@ -208,7 +208,8 @@
                 */
                bbsize = 32768;
                if (bbsize < (tsz + dsz + bsz)) {
-                       err(1, "%s: too big.", argv[0]);
+                       errx(1, "%s: too big (%d < (%d + %d + %d))",
+                           argv[0], bbsize, tsz, dsz, bsz);
                }
                sumsize = bbsize / 512;
        }



Home | Main Index | Thread Index | Old Index