Module Name: src Committed By: matt Date: Mon Dec 14 00:43:06 UTC 2009
Modified Files: src/usr.bin/elf2ecoff: Makefile elf2ecoff.c Log Message: Merge from matt-nb5-mips64 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/elf2ecoff/Makefile cvs rdiff -u -r1.23 -r1.24 src/usr.bin/elf2ecoff/elf2ecoff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/elf2ecoff/Makefile diff -u src/usr.bin/elf2ecoff/Makefile:1.10 src/usr.bin/elf2ecoff/Makefile:1.11 --- src/usr.bin/elf2ecoff/Makefile:1.10 Sun May 18 07:57:34 2003 +++ src/usr.bin/elf2ecoff/Makefile Mon Dec 14 00:43:05 2009 @@ -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 Index: src/usr.bin/elf2ecoff/elf2ecoff.c diff -u src/usr.bin/elf2ecoff/elf2ecoff.c:1.23 src/usr.bin/elf2ecoff/elf2ecoff.c:1.24 --- src/usr.bin/elf2ecoff/elf2ecoff.c:1.23 Thu Apr 23 14:49:32 2009 +++ src/usr.bin/elf2ecoff/elf2ecoff.c Mon Dec 14 00:43:05 2009 @@ -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)));