Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/crunch/crunchgen If USE_NEW_TOOLCHAIN is defined use...



details:   https://anonhg.NetBSD.org/src/rev/1648091a6eac
branches:  trunk
changeset: 515844:1648091a6eac
user:      jmc <jmc%NetBSD.org@localhost>
date:      Fri Oct 05 22:52:56 2001 +0000

description:
If USE_NEW_TOOLCHAIN is defined use objcopy instead of crunchide as it works now.

diffstat:

 usr.bin/crunch/crunchgen/Makefile    |   9 ++++++++-
 usr.bin/crunch/crunchgen/crunchgen.c |  13 +++++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)

diffs (66 lines):

diff -r 8b391185585b -r 1648091a6eac usr.bin/crunch/crunchgen/Makefile
--- a/usr.bin/crunch/crunchgen/Makefile Fri Oct 05 22:40:10 2001 +0000
+++ b/usr.bin/crunch/crunchgen/Makefile Fri Oct 05 22:52:56 2001 +0000
@@ -1,10 +1,17 @@
-#      $NetBSD: Makefile,v 1.4 1997/10/24 09:00:26 lukem Exp $
+#      $NetBSD: Makefile,v 1.5 2001/10/05 22:52:56 jmc Exp $
 
 PROG=crunchgen
 SRCS=crunchgen.c crunched_skel.c
 CLEANFILES+= crunched_skel.c
 
+# XXX This should go away and the code cleaned up with all ports are converted
+.if defined(USE_NEW_TOOLCHAIN)
+CPPFLAGS= -DNEW_TOOLCHAIN
+.endif
+
 crunched_skel.c: crunched_main.c
        sh ${.CURDIR}/mkskel.sh ${.CURDIR}/crunched_main.c > crunched_skel.c
 
+.ifndef HOSTPROG
 .include <bsd.prog.mk>
+.endif
diff -r 8b391185585b -r 1648091a6eac usr.bin/crunch/crunchgen/crunchgen.c
--- a/usr.bin/crunch/crunchgen/crunchgen.c      Fri Oct 05 22:40:10 2001 +0000
+++ b/usr.bin/crunch/crunchgen/crunchgen.c      Fri Oct 05 22:52:56 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crunchgen.c,v 1.24 2001/10/04 07:34:47 jmc Exp $       */
+/*     $NetBSD: crunchgen.c,v 1.25 2001/10/05 22:52:56 jmc Exp $       */
 /*
  * Copyright (c) 1994 University of Maryland
  * All Rights Reserved.
@@ -33,7 +33,7 @@
  */
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: crunchgen.c,v 1.24 2001/10/04 07:34:47 jmc Exp $");
+__RCSID("$NetBSD: crunchgen.c,v 1.25 2001/10/05 22:52:56 jmc Exp $");
 #endif
 
 #include <stdlib.h>
@@ -804,7 +804,11 @@
 
     fprintf(outmk, "DBG=%s\n", dbg);
     fprintf(outmk, "STRIP?=strip\n");
+#ifdef NEW_TOOLCHAIN
+    fprintf(outmk, "OBJCOPY?=objcopy\n");
+#else
     fprintf(outmk, "CRUNCHIDE?=crunchide\n");
+#endif
 
     fprintf(outmk, "CRUNCHED_OBJS=");
     for(p = progs; p != NULL; p = p->next)
@@ -869,8 +873,13 @@
                p->name, p->name, p->ident);
     fprintf(outmk, "\t${LD} -dc -r -o %s.cro %s_stub.o $(%s_OBJPATHS)\n", 
            p->name, p->name, p->ident);
+#ifdef NEW_TOOLCHAIN
+    fprintf(outmk, "\t${OBJCOPY} -S -K _crunched_%s_stub %s.cro\n",
+           p->ident, p->name);
+#else
     fprintf(outmk, "\t${CRUNCHIDE} -k _crunched_%s_stub %s.cro\n", 
            p->ident, p->name);
+#endif
 }
 
 void output_strlst(FILE *outf, strlst_t *lst)



Home | Main Index | Thread Index | Old Index