NetBSD Problem Report #8369

Received: (qmail 27946 invoked from network); 10 Sep 1999 18:31:58 -0000
Message-Id: <19990911033153Q.uch@nop.or.jp>
Date: Sat, 11 Sep 1999 03:31:53 +0900
From: UCHIYAMA Yasushi <uch@nop.or.jp>
To: gnats-bugs@gnats.netbsd.org
Subject: gnu/usr.bin/gdb/Makefile, gnu/usr.bin/gdb/mkinit.sh, regress/sys/kern/execve/Makefile, sbin/fdisk/Makefile, usr.sbin/config/mkioconf.c

>Number:         8369
>Category:       misc
>Synopsis:       gnu/usr.bin/gdb/Makefile, gnu/usr.bin/gdb/mkinit.sh, regress/sys/kern/execve/Makefile, sbin/fdisk/Makefile, usr.sbin/config/mkioconf.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    enami
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 10 11:35:00 +0000 1999
>Closed-Date:    Sat Sep 25 13:07:34 +0000 1999
>Last-Modified:  Sat Sep 25 13:08:26 +0000 1999
>Originator:     UCHIYAMA Yasushi
>Release:        1999-08-24
>Organization:
>Environment:
NetBSD  1.4K NetBSD 1.4K (GENERIC) #0: Sat Sep 11 02:01:13 JST 1999     uch@anko:/work/netbsd/cvsrep/hpcmips/sys/arch/hpcmips/compile/GENERIC hpcmips
>Description:
 I intend to import hpcmips port of NetBSD. 
Following are MI part of patches of our CVS tree.
Please review these.

gnu/usr.bin/gdb/Makefile
gnu/usr.bin/gdb/mkinit.sh
 use ${NM} for cross-compile

regress/sys/kern/execve/Makefile
 correct link library.

sbin/fdisk/Makefile
 build mbr_bootsel only when ${MACHINE} == "i386" 

usr.sbin/config/mkioconf.c
 fix ioconf.incl.${machine} include path 

>How-To-Repeat:
>Fix:
Index: gnu/usr.bin/gdb/Makefile
===================================================================
RCS file: /cvsroot/hpcmips/gnu/usr.bin/gdb/Makefile,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- Makefile	1999/08/25 09:26:33	1.1.1.2
+++ Makefile	1999/08/30 12:34:55	1.2
@@ -99,9 +99,11 @@
 .include <bsd.info.mk>
 .include <bsd.prog.mk>

+NM?=	nm
+
 init.o: ${OBJS:Ninit.o} Makefile
 	@-rm -f init.c
-	sh ${.CURDIR}/mkinit.sh ${OBJS:Ninit.o} >init.c
+	env NM=${NM} sh ${.CURDIR}/mkinit.sh ${OBJS:Ninit.o} >init.c
 	${COMPILE.c} init.c

 ${OBJS}: nm.h tm.h xm.h
Index: gnu/usr.bin/gdb/mkinit.sh
===================================================================
RCS file: /cvsroot/hpcmips/gnu/usr.bin/gdb/mkinit.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- mkinit.sh	1999/05/06 05:07:12	1.1.1.1
+++ mkinit.sh	1999/08/30 12:34:55	1.2
@@ -13,7 +13,7 @@
 awk=${AWK:-awk}

 # Does the compiler prepend an underscore?
-if (nm version.o |grep -q ' _version')
+if (${NM} version.o |grep -q ' _version')
 then
  sedarg='s/ _/ /'
 else
@@ -27,7 +27,7 @@

 for f
 do
-  nm -p $f
+  ${NM} -p $f
 done |
 sed -e "$sedarg" |
 $awk '
Index: regress/sys/kern/execve/Makefile
===================================================================
RCS file: /cvsroot/hpcmips/regress/sys/kern/execve/Makefile,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -u -r1.1.1.2 -r1.3
--- Makefile	1999/08/25 09:38:16	1.1.1.2
+++ Makefile	1999/08/25 12:10:55	1.3
@@ -7,7 +7,7 @@

 .include <bsd.own.mk>		# May define DESTDIR in mk.conf..
 .if defined(DESTDIR)
-LDLIBS+= -lgcc -lc ${LIBCRTEND}
+LDLIBS+= -lgcc -lc -lgcc ${LIBCRTEND}
 GOODAOUT_LIB= -nostdlib -L${DESTDIR}/usr/lib ${LDSTATIC} 
 GOODAOUT_LIB+= ${LIBCRT0} ${LIBCRTBEGIN}
 .else
Index: sbin/fdisk/Makefile
===================================================================
RCS file: /cvsroot/hpcmips/sbin/fdisk/Makefile,v
retrieving revision 1.1.1.2
retrieving revision 1.4
diff -u -r1.1.1.2 -r1.4
--- Makefile	1999/08/25 09:38:40	1.1.1.2
+++ Makefile	1999/08/27 01:10:54	1.4
@@ -2,12 +2,14 @@

 SUBDIR=	mbr

-.if (${MACHINE} == "i386" || ${MACHINE} == "bebox" || ${MACHINE} == "ofppc")
+.if (${MACHINE} == "i386" || ${MACHINE} == "bebox" || ${MACHINE} == "ofppc" || ${MACHINE} == "hpcmips")
 PROG=	fdisk 
 SRCS=	fdisk.c
 DPADD+=	${LIBUTIL}
 LDADD+=	-lutil
+.if ${MACHINE} == "i386"
 SUBDIR+= mbr_bootsel
+.endif
 .endif


Index: usr.sbin/config/mkioconf.c
===================================================================
RCS file: /cvsroot/hpcmips/usr.sbin/config/mkioconf.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- mkioconf.c	1999/02/09 03:49:53	1.1.1.1
+++ mkioconf.c	1999/08/29 03:07:24	1.2
@@ -122,7 +122,7 @@
 {
 	FILE *ifp;
 	int n;
-	char ifn[200], buf[BUFSIZ];
+	char *ifn, buf[BUFSIZ];

 	if (fprintf(ofp, "\
 /*\n\
@@ -131,7 +131,8 @@
  * ioconf.c, from \"%s\"\n\
  */\n\n", conffile) < 0)
 		return (1);
-	(void)sprintf(ifn, "ioconf.incl.%s", machine);
+	(void)sprintf(buf, "arch/%s/conf/ioconf.incl.%s", machine, machine);
+	ifn = sourcepath(buf);
 	if ((ifp = fopen(ifn, "r")) != NULL) {
 		while ((n = fread(buf, 1, sizeof(buf), ifp)) > 0)
 			if (fwrite(buf, 1, n, ofp) != n)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: misc-bug-people->enami 
Responsible-Changed-By: enami 
Responsible-Changed-When: Thu Sep 23 21:32:26 PDT 1999 
Responsible-Changed-Why:  
I'll fix these bugs. 
State-Changed-From-To: open->analyzed 
State-Changed-By: enami 
State-Changed-When: Fri Sep 24 22:37:47 PDT 1999 
State-Changed-Why:  
I've understand most of problems listed here. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: enami 
State-Changed-When: Sat Sep 25 06:07:34 PDT 1999 
State-Changed-Why:  
All reported problems are fixed.  Thanks. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.