Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/elf2ecoff Merge from matt-nb5-mips64



details:   https://anonhg.NetBSD.org/src/rev/87ce2745a011
branches:  trunk
changeset: 749982:87ce2745a011
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Dec 14 00:43:05 2009 +0000

description:
Merge from matt-nb5-mips64

diffstat:

 usr.bin/elf2ecoff/Makefile    |   7 +++++--
 usr.bin/elf2ecoff/elf2ecoff.c |  10 +++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r 471f025f1439 -r 87ce2745a011 usr.bin/elf2ecoff/Makefile
--- a/usr.bin/elf2ecoff/Makefile        Mon Dec 14 00:42:47 2009 +0000
+++ b/usr.bin/elf2ecoff/Makefile        Mon Dec 14 00:43:05 2009 +0000
@@ -1,10 +1,13 @@
-#      $NetBSD: Makefile,v 1.10 2003/05/18 07:57:34 lukem Exp $
+#      $NetBSD: Makefile,v 1.11 2009/12/14 00:43:05 matt Exp $
 #      from: @(#)Makefile      5.4 (Berkeley) 5/11/90
 
 .include <bsd.own.mk>
 
+ABI64:=  ${CPUFLAGS:M-mabi=64:M-mabi=o64}
 # Build ELF to {ecoff, aout} tools on mips, for old bootblocks/PROMs.
-.if (${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb")
+.if (${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
+     ((${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb") && \
+      !defined(HOSTPROG) && empty(ABI64)))
 
 PROG=  elf2ecoff
 
diff -r 471f025f1439 -r 87ce2745a011 usr.bin/elf2ecoff/elf2ecoff.c
--- a/usr.bin/elf2ecoff/elf2ecoff.c     Mon Dec 14 00:42:47 2009 +0000
+++ b/usr.bin/elf2ecoff/elf2ecoff.c     Mon Dec 14 00:43:05 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf2ecoff.c,v 1.23 2009/04/23 14:49:32 tsutsui Exp $   */
+/*     $NetBSD: elf2ecoff.c,v 1.24 2009/12/14 00:43:05 matt Exp $      */
 
 /*
  * Copyright (c) 1997 Jonathan Stone
@@ -400,16 +400,16 @@
        /* Write the headers... */
        safewrite(outfile, &ep.f, sizeof(ep.f), "ep.f: write: %s\n");
        if (debug)
-               fprintf(stderr, "wrote %d byte file header.\n", sizeof(ep.f));
+               fprintf(stderr, "wrote %zu byte file header.\n", sizeof(ep.f));
 
        safewrite(outfile, &ep.a, sizeof(ep.a), "ep.a: write: %s\n");
        if (debug)
-               fprintf(stderr, "wrote %d byte a.out header.\n", sizeof(ep.a));
+               fprintf(stderr, "wrote %zu byte a.out header.\n", sizeof(ep.a));
 
        safewrite(outfile, &esecs, sizeof(esecs[0]) * nsecs,
            "esecs: write: %s\n");
        if (debug)
-               fprintf(stderr, "wrote %d bytes of section headers.\n",
+               fprintf(stderr, "wrote %zu bytes of section headers.\n",
                    sizeof(esecs[0]) * nsecs);
 
 
@@ -661,7 +661,7 @@
        symhdrp->issExtMax = strsize;
        if (debug)
                fprintf(stderr,
-                   "ECOFF symhdr: symhdr %x, strsize %lx, symsize %lx\n",
+                   "ECOFF symhdr: symhdr %zx, strsize %lx, symsize %lx\n",
                    sizeof(*symhdrp), strsize,
                    (nesyms * sizeof(struct ecoff_extsym)));
 



Home | Main Index | Thread Index | Old Index