Subject: Patches to fix building cross-compiler tools on Red Hat Linux 7.3
To: None <tech-userlevel@netbsd.org>
From: Ian Lance Taylor <ian@airs.com>
List: tech-userlevel
Date: 04/14/2003 16:16:19
Hi, I'm experimenting with cross-building NetBSD using Red Hat Linux
7.3 as a build system.

Following the instructions at
    http://netbsd.org/Documentation/cross/
I started by typing this:
    ./build.sh -m algor -T /home/ian/netbsd-mips-tools tools

I got several errors related to __RCSID.  I didn't save the error
messages, but I can recreate them if required.  Basically, they were
all related to the fact that __RCSID is not defined by the build
system compiler.

Here is a simple patch which enables ``build.sh tools'' to complete.

I am not on this mailing list, so please CC me explicitly on any
replies.  I'm not all that familiar with the NetBSD mailing lists, so
I don't know if this is the right list; please let me know if some
other list is more appropriate.

Ian

Index: dist/file/src/apprentice.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/apprentice.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 apprentice.c
--- dist/file/src/apprentice.c	2003/03/25 22:30:16	1.1.1.1
+++ dist/file/src/apprentice.c	2003/04/14 22:55:38
@@ -52,7 +52,7 @@
 #endif
 
 #ifndef	lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: apprentice.c,v 1.54 2003/03/24 01:16:28 christos Exp")
 #else
 __RCSID("$NetBSD: apprentice.c,v 1.1.1.1 2003/03/25 22:30:16 pooka Exp $");
Index: dist/file/src/apptype.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/apptype.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 apptype.c
--- dist/file/src/apptype.c	2003/03/25 22:30:16	1.1.1.1
+++ dist/file/src/apptype.c	2003/04/14 22:55:39
@@ -40,7 +40,7 @@
 #include "file.h"
 
 #ifndef	lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: apptype.c,v 1.2 2003/03/24 14:53:31 christos Exp")
 #else
 __RCSID("$NetBSD: apptype.c,v 1.1.1.1 2003/03/25 22:30:16 pooka Exp $");
Index: dist/file/src/ascmagic.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/ascmagic.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ascmagic.c
--- dist/file/src/ascmagic.c	2003/03/25 22:30:17	1.1.1.1
+++ dist/file/src/ascmagic.c	2003/04/14 22:55:40
@@ -56,7 +56,7 @@
 #include "names.h"
 
 #ifndef	lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: ascmagic.c,v 1.35 2003/03/23 21:16:26 christos Exp")
 #else
 __RCSID("$NetBSD: ascmagic.c,v 1.1.1.1 2003/03/25 22:30:17 pooka Exp $");
Index: dist/file/src/compress.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/compress.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 compress.c
--- dist/file/src/compress.c	2003/03/25 22:30:17	1.1.1.1
+++ dist/file/src/compress.c	2003/04/14 22:55:41
@@ -57,7 +57,7 @@
 #endif
 
 #ifndef lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: compress.c,v 1.29 2003/03/24 01:16:28 christos Exp")
 #else
 __RCSID("$NetBSD: compress.c,v 1.1.1.1 2003/03/25 22:30:17 pooka Exp $");
Index: dist/file/src/file.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/file.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 file.c
--- dist/file/src/file.c	2003/03/25 22:30:18	1.1.1.1
+++ dist/file/src/file.c	2003/04/14 22:55:42
@@ -74,7 +74,7 @@
 #include "patchlevel.h"
 
 #ifndef	lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: file.c,v 1.73 2003/03/24 01:34:21 christos Exp")
 #else
 __RCSID("$NetBSD: file.c,v 1.1.1.1 2003/03/25 22:30:18 pooka Exp $");
Index: dist/file/src/fsmagic.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/fsmagic.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fsmagic.c
--- dist/file/src/fsmagic.c	2003/03/25 22:30:18	1.1.1.1
+++ dist/file/src/fsmagic.c	2003/04/14 22:55:43
@@ -64,7 +64,7 @@
 #undef HAVE_MAJOR
 
 #ifndef	lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: fsmagic.c,v 1.38 2003/03/23 21:16:26 christos Exp")
 #else
 __RCSID("$NetBSD: fsmagic.c,v 1.1.1.1 2003/03/25 22:30:18 pooka Exp $");
Index: dist/file/src/is_tar.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/is_tar.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 is_tar.c
--- dist/file/src/is_tar.c	2003/03/25 22:30:18	1.1.1.1
+++ dist/file/src/is_tar.c	2003/04/14 22:55:43
@@ -51,7 +51,7 @@
 #include "tar.h"
 
 #ifndef lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: is_tar.c,v 1.19 2003/03/23 21:16:26 christos Exp")
 #else
 __RCSID("$NetBSD: is_tar.c,v 1.1.1.1 2003/03/25 22:30:18 pooka Exp $");
Index: dist/file/src/magic.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/magic.c,v
retrieving revision 1.3
diff -u -r1.3 magic.c
--- dist/file/src/magic.c	2003/03/25 23:41:17	1.3
+++ dist/file/src/magic.c	2003/04/14 22:55:43
@@ -38,7 +38,7 @@
 #include "patchlevel.h"
 
 #ifndef	lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: magic.c,v 1.5 2003/03/24 01:34:21 christos Exp")
 #else
 __RCSID("$NetBSD: magic.c,v 1.3 2003/03/25 23:41:17 pooka Exp $");
Index: dist/file/src/print.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/print.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 print.c
--- dist/file/src/print.c	2003/03/25 22:30:20	1.1.1.1
+++ dist/file/src/print.c	2003/04/14 22:55:44
@@ -48,7 +48,7 @@
 #include <time.h>
 
 #ifndef lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: print.c,v 1.42 2003/03/24 01:16:28 christos Exp")
 #else
 __RCSID("$NetBSD: print.c,v 1.1.1.1 2003/03/25 22:30:20 pooka Exp $");
Index: dist/file/src/readelf.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/readelf.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 readelf.c
--- dist/file/src/readelf.c	2003/03/25 22:30:20	1.1.1.1
+++ dist/file/src/readelf.c	2003/04/14 22:55:45
@@ -41,7 +41,7 @@
 #include "readelf.h"
 
 #ifndef lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: readelf.c,v 1.30 2003/03/23 21:16:26 christos Exp")
 #else
 __RCSID("$NetBSD: readelf.c,v 1.1.1.1 2003/03/25 22:30:20 pooka Exp $");
Index: dist/file/src/softmagic.c
===================================================================
RCS file: /cvsroot/src/dist/file/src/softmagic.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 softmagic.c
--- dist/file/src/softmagic.c	2003/03/25 22:30:22	1.1.1.1
+++ dist/file/src/softmagic.c	2003/04/14 22:55:47
@@ -46,7 +46,7 @@
 
 
 #ifndef	lint
-#if 0
+#ifndef __RCSID
 FILE_RCSID("@(#)Id: softmagic.c,v 1.57 2003/03/24 01:16:28 christos Exp")
 #else
 __RCSID("$NetBSD: softmagic.c,v 1.1.1.1 2003/03/25 22:30:22 pooka Exp $");
Index: usr.sbin/installboot/arch/i386.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/installboot/arch/i386.c,v
retrieving revision 1.1
diff -u -r1.1 i386.c
--- usr.sbin/installboot/arch/i386.c	2003/04/09 22:14:27	1.1
+++ usr.sbin/installboot/arch/i386.c	2003/04/14 23:00:33
@@ -37,7 +37,9 @@
  */
 
 #include <sys/cdefs.h>
+#if defined(__RCSID) && !defined(__lint)
 __RCSID("$NetBSD: i386.c,v 1.1 2003/04/09 22:14:27 dsl Exp $");
+#endif	/* !__lint */
 
 #if HAVE_CONFIG_H
 #include "config.h"
Index: usr.sbin/makefs/ffs/mkfs.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/makefs/ffs/mkfs.c,v
retrieving revision 1.14
diff -u -r1.14 mkfs.c
--- usr.sbin/makefs/ffs/mkfs.c	2003/04/02 10:39:49	1.14
+++ usr.sbin/makefs/ffs/mkfs.c	2003/04/14 23:00:35
@@ -47,7 +47,9 @@
 #if 0
 static char sccsid[] = "@(#)mkfs.c	8.11 (Berkeley) 5/3/95";
 #else
+#ifdef __RCSID
 __RCSID("$NetBSD: mkfs.c,v 1.14 2003/04/02 10:39:49 fvdl Exp $");
+#endif
 #endif
 #endif /* not lint */