From quinot@inf.enst.fr  Thu Apr  4 05:36:15 2002
Return-Path: <quinot@inf.enst.fr>
Received: from infres.enst.fr (infres-192.enst.fr [137.194.192.1])
	by hub.freebsd.org (Postfix) with ESMTP id CF5AB37B416
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  4 Apr 2002 05:36:14 -0800 (PST)
Received: from shalmaneser.enst.fr (shalmaneser.enst.fr [137.194.162.11])
	by infres.enst.fr (Postfix) with ESMTP id 5E60D18EE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  4 Apr 2002 15:36:13 +0200 (MEST)
Received: by shalmaneser.enst.fr (Postfix, from userid 11117)
	id 0362F11287; Thu,  4 Apr 2002 15:36:12 +0200 (CEST)
Message-Id: <20020404133612.0362F11287@shalmaneser.enst.fr>
Date: Thu,  4 Apr 2002 15:36:12 +0200 (CEST)
From: Thomas Quinot <thomas@cuivre.fr.eu.org>
Reply-To: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] Upgrade path from old -CURRENT is broken
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36747
>Category:       bin
>Synopsis:       [patch] Upgrade path from old -CURRENT is broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 04 05:40:01 PST 2002
>Closed-Date:    Sun Apr 07 10:08:10 PDT 2002
>Last-Modified:  Mon Apr  8 00:50:01 PDT 2002
>Originator:     Thomas Quinot
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD shalmaneser.enst.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #13: Thu Mar 21 14:41:17 CET 2002 root@shalmaneser.enst.fr:/usr/obj/usr/src/sys/SHALMANESER i386


	
>Description:
	Recent changes to lib/libc/stdio/mktemp.c and usr.bin/xlint/*
	have introduced dependencies on two features that were recently
	introduced: the __FBSDID macro in cdefs.h, and the [gs]etprogname
	functions in stdlib.h. Unfortunately, these files are built
	as part of the cross-tools in buildworld.

	This breaks the upgrade path for systems installed with old
	versions of 5.0-CURRENT. 4-STABLE systems more than one year
	old are also probably impacted.

>How-To-Repeat:
	make buildworld on a freshly cvsupped source tree on a two year
	old 5.0-CURRENT box.
>Fix:

Here is a proposed solution:

diff -u usr.bin/xlint/lint1/cgram.y.dist usr.bin/xlint/lint1/cgram.y
--- usr.bin/xlint/lint1/cgram.y.dist	Thu Apr  4 12:47:01 2002
+++ usr.bin/xlint/lint1/cgram.y	Thu Apr  4 13:45:45 2002
@@ -37,7 +37,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: cgram.y,v 1.23 2002/01/31 19:36:53 tv Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint1/cgram.y,v 1.7 2002/03/03 15:12:19 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <stdlib.h>
 #include <string.h>
diff -u usr.bin/xlint/lint1/scan.l.dist usr.bin/xlint/lint1/scan.l
--- usr.bin/xlint/lint1/scan.l.dist	Thu Apr  4 12:47:02 2002
+++ usr.bin/xlint/lint1/scan.l	Thu Apr  4 13:48:24 2002
@@ -37,7 +37,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: scan.l,v 1.26 2002/01/31 22:30:21 tv Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint1/scan.l,v 1.11 2002/03/03 15:12:20 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <stdlib.h>
 #include <string.h>
diff -u usr.bin/xlint/lint1/decl.c.dist usr.bin/xlint/lint1/decl.c
--- usr.bin/xlint/lint1/decl.c.dist	Thu Apr  4 12:47:01 2002
+++ usr.bin/xlint/lint1/decl.c	Thu Apr  4 13:54:56 2002
@@ -36,7 +36,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint1/decl.c,v 1.10 2002/03/03 15:12:19 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <sys/param.h>
 #include <limits.h>
diff -u usr.bin/xlint/lint1/err.c.dist usr.bin/xlint/lint1/err.c
--- usr.bin/xlint/lint1/err.c.dist	Thu Apr  4 12:47:02 2002
+++ usr.bin/xlint/lint1/err.c	Thu Apr  4 13:55:04 2002
@@ -35,7 +35,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: err.c,v 1.16 2001/12/13 23:56:00 augustss Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint1/err.c,v 1.8 2002/03/03 15:12:19 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <sys/types.h>
 #include <stdlib.h>
diff -u usr.bin/xlint/lint1/func.c.dist usr.bin/xlint/lint1/func.c
--- usr.bin/xlint/lint1/func.c.dist	Thu Apr  4 12:47:02 2002
+++ usr.bin/xlint/lint1/func.c	Thu Apr  4 13:55:09 2002
@@ -35,7 +35,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: func.c,v 1.16 2002/01/03 04:25:15 thorpej Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint1/func.c,v 1.9 2002/03/03 15:12:19 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <stdlib.h>
 #include <string.h>
diff -u usr.bin/xlint/lint1/mem1.c.dist usr.bin/xlint/lint1/mem1.c
--- usr.bin/xlint/lint1/mem1.c.dist	Thu Apr  4 12:47:02 2002
+++ usr.bin/xlint/lint1/mem1.c	Thu Apr  4 13:55:14 2002
@@ -35,7 +35,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: mem1.c,v 1.6 2002/01/29 02:43:39 tv Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint1/mem1.c,v 1.8 2002/03/03 15:12:20 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <sys/types.h>
 #include <sys/mman.h>
diff -u usr.bin/xlint/lint1/tree.c.dist usr.bin/xlint/lint1/tree.c
--- usr.bin/xlint/lint1/tree.c.dist	Thu Apr  4 12:47:02 2002
+++ usr.bin/xlint/lint1/tree.c	Thu Apr  4 13:55:18 2002
@@ -35,7 +35,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: tree.c,v 1.24 2002/01/31 22:30:20 tv Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint1/tree.c,v 1.12 2002/03/03 15:12:20 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <stdlib.h>
 #include <string.h>
diff -u usr.bin/xlint/lint1/main1.c.dist usr.bin/xlint/lint1/main1.c
--- usr.bin/xlint/lint1/main1.c.dist	Thu Apr  4 12:47:02 2002
+++ usr.bin/xlint/lint1/main1.c	Thu Apr  4 14:02:55 2002
@@ -113,7 +113,7 @@
 
 err_set	msgset;
 
-static	void	usage(void);
+static	void	usage(char *);
 
 int main(int, char *[]);
 
@@ -123,8 +123,6 @@
 	int	c;
 	char	*ptr;
 
-	setprogname(argv[0]);
-
 	ERR_ZERO(&msgset);
 	while ((c = getopt(argc, argv, "abcdeghmprstuvwyzFX:")) != -1) {
 		switch (c) {
@@ -168,7 +166,7 @@
 			break;
 		case '?':
 		default:
-			usage();
+			usage(argv[0]);
 			break;
 		}
 	}
@@ -176,7 +174,7 @@
 	argv += optind;
 
 	if (argc != 2)
-		usage();
+		usage(argv[0]);
 
 	/* open the input file */
 	if ((yyin = fopen(argv[0], "r")) == NULL)
@@ -206,11 +204,11 @@
 }
 
 static void
-usage(void)
+usage(char *progname)
 {
 	(void)fprintf(stderr,
 	    "Usage: %s [-abcdeghmprstuvwyzF] [-X <id>[,<id>]... src dest\n",
-	    getprogname());
+	    progname);
 	exit(1);
 }
 
diff -u usr.bin/xlint/lint2/mem2.c.dist usr.bin/xlint/lint2/mem2.c
--- usr.bin/xlint/lint2/mem2.c.dist	Thu Apr  4 12:47:02 2002
+++ usr.bin/xlint/lint2/mem2.c	Thu Apr  4 14:34:47 2002
@@ -35,7 +35,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: mem2.c,v 1.6 2002/01/21 19:49:52 tv Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint2/mem2.c,v 1.7 2002/03/03 15:12:22 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <sys/param.h>
 #include <sys/types.h>
diff -u usr.bin/xlint/lint2/read.c.dist usr.bin/xlint/lint2/read.c
--- usr.bin/xlint/lint2/read.c.dist	Thu Apr  4 12:47:02 2002
+++ usr.bin/xlint/lint2/read.c	Thu Apr  4 14:34:57 2002
@@ -36,7 +36,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: read.c,v 1.12 2002/01/21 19:49:52 tv Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/lint2/read.c,v 1.8 2002/03/03 15:12:22 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <ctype.h>
 #include <limits.h>
diff -u usr.bin/xlint/xlint/xlint.c.dist usr.bin/xlint/xlint/xlint.c
--- usr.bin/xlint/xlint/xlint.c.dist	Thu Apr  4 12:47:03 2002
+++ usr.bin/xlint/xlint/xlint.c	Thu Apr  4 14:38:12 2002
@@ -36,7 +36,11 @@
 #if defined(__RCSID) && !defined(lint)
 __RCSID("$NetBSD: xlint.c,v 1.26 2002/01/22 01:14:03 thorpej Exp $");
 #endif
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/usr.bin/xlint/xlint/xlint.c,v 1.17 2002/03/11 11:32:55 markm Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 #include <sys/param.h>
 #include <sys/wait.h>
@@ -132,7 +136,7 @@
 static	void	terminate(int) __attribute__((__noreturn__));
 static	const	char *lbasename(const char *, int);
 static	void	appdef(char ***, const char *);
-static	void	usage(void);
+static	void	usage(char *);
 static	void	fname(const char *);
 static	void	runchild(const char *, char *const *, const char *, int);
 static	void	findlibs(char *const *);
@@ -279,18 +283,18 @@
 }
 
 static void
-usage(void)
+usage(char *progname)
 {
 
 	(void)fprintf(stderr,
 	    "Usage: %s [-abceghprvwxzHF] [-s|-t] [-i|-nu] [-Dname[=def]]"
-	    " [-Uname] [-X <id>[,<id>]...\n", getprogname());
+	    " [-Uname] [-X <id>[,<id>]...\n", progname);
 	(void)fprintf(stderr,
 	    "\t[-Idirectory] [-Ldirectory] [-llibrary] [-ooutputfile]"
 	    " file...\n");
 	(void)fprintf(stderr,
 	    "       %s [-abceghprvwzHF] [-s|-t] -Clibrary [-Dname[=def]]\n"
-	    " [-X <id>[,<id>]...\n", getprogname());
+	    " [-X <id>[,<id>]...\n", progname);
 	(void)fprintf(stderr, "\t[-Idirectory] [-Uname] [-Bpath] file"
 	    " ...\n");
 	terminate(-1);
@@ -304,8 +308,6 @@
 	char	flgbuf[3], *tmp, *s;
 	size_t	len;
 
-	setprogname(argv[0]);
-
 	if ((tmp = getenv("TMPDIR")) == NULL || (len = strlen(tmp)) == 0) {
 		tmpdir = xstrdup(_PATH_TMP);
 	} else {
@@ -395,7 +397,7 @@
 
 		case 'i':
 			if (Cflag)
-				usage();
+				usage(argv[0]);
 			iflag = 1;
 			break;
 
@@ -414,7 +416,7 @@
 
 		case 's':
 			if (tflag)
-				usage();
+				usage(argv[0]);
 			freelst(&lcflags);
 			appcstrg(&lcflags, "-trigraphs");
 			appcstrg(&lcflags, "-Wtrigraphs");
@@ -428,7 +430,7 @@
 #if !HAVE_CONFIG_H
 		case 't':
 			if (sflag)
-				usage();
+				usage(argv[0]);
 			freelst(&lcflags);
 			appcstrg(&lcflags, "-traditional");
 			appstrg(&lcflags, concat2("-D", MACHINE));
@@ -445,7 +447,7 @@
 
 		case 'C':
 			if (Cflag || oflag || iflag)
-				usage();
+				usage(argv[0]);
 			Cflag = 1;
 			appstrg(&l2flags, concat2("-C", optarg));
 			p2out = xmalloc(sizeof ("llib-l.ln") + strlen(optarg));
@@ -455,7 +457,7 @@
 
 		case 'd':
 			if (dflag)
-				usage();
+				usage(argv[0]);
 			dflag = 1;
 			appcstrg(&cflags, "-nostdinc");
 			appcstrg(&cflags, "-idirafter");
@@ -475,7 +477,7 @@
 
 		case 'o':
 			if (Cflag || oflag)
-				usage();
+				usage(argv[0]);
 			oflag = 1;
 			outputfn = xstrdup(optarg);
 			break;
@@ -498,7 +500,7 @@
 			break;
 
 		default:
-			usage();
+			usage(argv[0]);
 			/* NOTREACHED */
 		}
 	}
@@ -529,7 +531,7 @@
 				break;
 
 			default:
-				usage();
+				usage(argv[0]);
 				/* NOTREACHED */
 			}
 			if (arg[2])
@@ -538,7 +540,7 @@
 				argc--;
 				appcstrg(list, *++argv);
 			} else
-				usage();
+				usage(argv[0]);
 		} else {
 			/* filename */
 			fname(arg);
@@ -549,7 +551,7 @@
 	}
 
 	if (first)
-		usage();
+		usage(argv[0]);
 
 	if (iflag)
 		terminate(0);
diff -u lib/libc/stdio/mktemp.c.dist lib/libc/stdio/mktemp.c
--- lib/libc/stdio/mktemp.c.dist	Thu Apr  4 13:34:45 2002
+++ lib/libc/stdio/mktemp.c	Thu Apr  4 13:46:30 2002
@@ -35,7 +35,11 @@
 static char sccsid[] = "@(#)mktemp.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
+#ifdef __FBSDID
 __FBSDID("$FreeBSD: src/lib/libc/stdio/mktemp.c,v 1.24 2002/03/22 21:53:04 obrien Exp $");
+#elif !defined(lint)
+static char rcsid[] = "$FreeBSD$";
+#endif
 
 /* #include "namespace.h" */
 #include <sys/types.h>

>Release-Note:
>Audit-Trail:

From: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/36747 Upgrade path from old -CURRENT is broken
Date: Thu, 4 Apr 2002 18:34:07 +0200

 It appears that the kernel build is borken as well:
 
 ===> 3dfx
 cc -O -pipe   -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I-   -I. -I@ -I@/dev -I@/../include -fno-common -g -mpreferred-stack-boundary=2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi -c /usr/src/sys/modules/3dfx/../../dev/tdfx/tdfx_pci.c
 ld  -d -warn-common -r -d -o 3dfx.kld tdfx_pci.o
 touch /usr/obj/usr/src/sys/PYTHON/modules/usr/src/sys/modules/3dfx/export_syms
 awk -f /usr/src/sys/modules/3dfx/../../conf/kmod_syms.awk 3dfx.kld /usr/obj/usr/src/sys/PYTHON/modules/usr/src/sys/modules/3dfx/export_syms |  xargs -J% objcopy % 3dfx.kld
 xargs: illegal option -- J
 usage: xargs [-0] [-t] [-n number [-x]] [-s size] [utility [argument
 ...]]
 *** Error code 1
 
 -- 
     Thomas.Quinot@Cuivre.FR.EU.ORG

From: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/36747 [obrien@freebsd.org: Re: Updating from 4.4]
Date: Sat, 6 Apr 2002 11:53:38 +0200

 ----- Forwarded message from David O'Brien <obrien@freebsd.org> -----
 
 Date: Fri, 5 Apr 2002 21:13:57 -0800
 From: "David O'Brien" <obrien@freebsd.org>
 To: Thomas Quinot <thomas@cuivre.fr.eu.org>
 Cc: sjh@ucf.ics.uci.edu, freebsd-current@freebsd.org
 Subject: Re: Updating from 4.4
 
 On Sat, Apr 06, 2002 at 12:16:22AM +0200, Thomas Quinot wrote:
 > > Doing a buildworld I get:
 > 
 > > /usr/src/gnu/usr.bin/cc/cc_fbsd/../../../../lib/libc/stdio/mktemp.c:38:
 > > syntax error before string constant
 > 
 > Got hit by that one two days ago. There is a patch in PR bin/36747.
 
 If possible, I would like for no one to commit this PR.  ru and I had a
 way to fix this once and for all.  I would like a few days to investigate
 this.
 
 ----- End forwarded message -----
 
 -- 
     Thomas.Quinot@Cuivre.FR.EU.ORG
Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Sat Apr 6 11:18:25 PST 2002 
Responsible-Changed-Why:  
I will fix it later next week. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36747 

From: "Crist J. Clark" <cjc@FreeBSD.ORG>
To: Thomas Quinot <thomas@cuivre.fr.eu.org>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/36747: [patch] Upgrade path from old -CURRENT is broken
Date: Sat, 6 Apr 2002 18:18:02 -0800

 On Thu, Apr 04, 2002 at 03:36:12PM +0200, Thomas Quinot wrote:
 > 
 > >Number:         36747
 > >Category:       bin
 > >Synopsis:       [patch] Upgrade path from old -CURRENT is broken
 
 This happens from time to time with cross tools. I've wondered why,
 
   >>> stage 4: populating ${WORLDTMP}/usr/include
 
 Is done after,
 
   >>> stage 3: cross tools
 
 Problems like this would not crop up if that order was reversed, if
 the cross tools used the ${WORLDTMP}/usr/include. I expect that there
 is a good reason why the cross tools try to use the system's include
 files rather than the ones in the new source, but I'm not aware of
 it. I think if I understood why it is the way it is, I'd have an
 easier time understanding the right way to fix it.
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

From: "Crist J. Clark" <cjc@FreeBSD.org>
To: Thomas Quinot <thomas@cuivre.fr.eu.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/36747 Upgrade path from old -CURRENT is broken
Date: Sat, 6 Apr 2002 18:23:22 -0800

 --+HP7ph2BbKc20aGI
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Thu, Apr 04, 2002 at 08:40:05AM -0800, Thomas Quinot wrote:
 > The following reply was made to PR bin/36747; it has been noted by GNATS.
 > 
 > From: Thomas Quinot <thomas@cuivre.fr.eu.org>
 > To: bug-followup@freebsd.org
 > Cc:  
 > Subject: Re: bin/36747 Upgrade path from old -CURRENT is broken
 > Date: Thu, 4 Apr 2002 18:34:07 +0200
 > 
 >  It appears that the kernel build is borken as well:
 >  
 >  ===> 3dfx
 >  cc -O -pipe   -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I-   -I. -I@ -I@/dev -I@/../include -fno-common -g -mpreferred-stack-boundary=2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi -c /usr/src/sys/modules/3dfx/../../dev/tdfx/tdfx_pci.c
 >  ld  -d -warn-common -r -d -o 3dfx.kld tdfx_pci.o
 >  touch /usr/obj/usr/src/sys/PYTHON/modules/usr/src/sys/modules/3dfx/export_syms
 >  awk -f /usr/src/sys/modules/3dfx/../../conf/kmod_syms.awk 3dfx.kld /usr/obj/usr/src/sys/PYTHON/modules/usr/src/sys/modules/3dfx/export_syms |  xargs -J% objcopy % 3dfx.kld
 >  xargs: illegal option -- J
 >  usage: xargs [-0] [-t] [-n number [-x]] [-s size] [utility [argument
 >  ...]]
 >  *** Error code 1
 
 Looks like xargs(1) needs to be a cross tool too.
 
 BTW, I wrote up some kludgy patches to get kldxref(8) to build as a
 cross tool as well after continued whining about the ignored error it
 generates during installkernel on a 4-STABLE to 5-CURRENT upgrade (or
 an upgrade from a really old 5-CURRENT). This might also fit in with
 these issues.
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
 
 --+HP7ph2BbKc20aGI
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="kldxref.build.patch"
 
 Index: src/Makefile.inc1
 ===================================================================
 RCS file: /export/freebsd/ncvs/src/Makefile.inc1,v
 retrieving revision 1.246
 diff -u -r1.246 Makefile.inc1
 --- src/Makefile.inc1	26 Mar 2002 16:05:09 -0000	1.246
 +++ src/Makefile.inc1	3 Apr 2002 05:54:54 -0000
 @@ -457,7 +457,9 @@
  #
  installkernel:
  	cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
 -	    ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} install
 +	    ${CROSSENV} \
 +	    PATH=${PATH}:${STRICTTMPPATH} \
 +	    ${MAKE} KERNEL=${INSTKERNNAME} install
  reinstallkernel:
  	cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
  	    ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} reinstall
 @@ -619,7 +621,8 @@
  
  cross-tools:
  .for _tool in ${_btxld} ${_elf2exe} \
 -    gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc ${_xlint}
 +    gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc ${_xlint} \
 +    usr.sbin/kldxref
  	cd ${.CURDIR}/${_tool}; \
  		${MAKE} obj; \
  		${MAKE} depend; \
 Index: src/sys/modules/Makefile
 ===================================================================
 RCS file: /export/freebsd/ncvs/src/sys/modules/Makefile,v
 retrieving revision 1.236
 diff -u -r1.236 Makefile
 --- src/sys/modules/Makefile	21 Mar 2002 09:15:38 -0000	1.236
 +++ src/sys/modules/Makefile	3 Apr 2002 01:57:18 -0000
 @@ -184,7 +184,7 @@
  .if !defined(NO_XREF)
  .MAKEFLAGS:=	${.MAKEFLAGS} -DNO_XREF
  afterinstall:
 -	-kldxref ${DESTDIR}${KMODDIR}
 +	kldxref ${DESTDIR}${KMODDIR}
  .endif
  
  .include <bsd.subdir.mk>
 Index: src/usr.sbin/kldxref/Makefile
 ===================================================================
 RCS file: /export/freebsd/ncvs/src/usr.sbin/kldxref/Makefile,v
 retrieving revision 1.4
 diff -u -r1.4 Makefile
 --- src/usr.sbin/kldxref/Makefile	10 Dec 2001 21:13:35 -0000	1.4
 +++ src/usr.sbin/kldxref/Makefile	3 Apr 2002 05:05:09 -0000
 @@ -5,4 +5,11 @@
  WARNS?=	2
  MAN=	kldxref.8
  
 +.if defined(BOOTSTRAPPING)
 +CFLAGS+=	-I${.CURDIR}/../../sys -I.
 +machine:
 +	ln -sf ${.CURDIR}/../../sys/${MACHINE_ARCH}/include machine
 +beforedepend: machine 
 +.endif
 +
  .include <bsd.prog.mk>
 
 --+HP7ph2BbKc20aGI--

From: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: "Crist J. Clark" <cjc@FreeBSD.ORG>
Cc: Thomas Quinot <thomas@cuivre.fr.eu.org>,
	FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/36747: [patch] Upgrade path from old -CURRENT is broken
Date: Sun, 7 Apr 2002 13:08:01 +0200

 Le 2002-04-07, Crist J. Clark crivait :
 
 > Problems like this would not crop up if that order was reversed, if
 > the cross tools used the ${WORLDTMP}/usr/include. I expect that there
 > is a good reason why the cross tools try to use the system's include
 > files rather than the ones in the new source, but I'm not aware of
 
 Well, cross tools are executed on the running (build) system, not on
 the target...
 
 -- 
     Thomas.Quinot@Cuivre.FR.EU.ORG

From: Ruslan Ermilov <ru@FreeBSD.org>
To: "Crist J. Clark" <cjc@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/36747 Upgrade path from old -CURRENT is broken
Date: Sun, 7 Apr 2002 14:57:50 +0300

 --ReaqsoxgOBHFXBhH
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sat, Apr 06, 2002 at 06:30:03PM -0800, Crist J. Clark wrote:
 > On Thu, Apr 04, 2002 at 08:40:05AM -0800, Thomas Quinot wrote:
 > > The following reply was made to PR bin/36747; it has been noted by GNAT=
 S.
 > >=20
 > > From: Thomas Quinot <thomas@cuivre.fr.eu.org>
 > > To: bug-followup@freebsd.org
 > > Cc: =20
 > > Subject: Re: bin/36747 Upgrade path from old -CURRENT is broken
 > > Date: Thu, 4 Apr 2002 18:34:07 +0200
 > >=20
 > >  It appears that the kernel build is borken as well:
 > > =20
 > >  =3D=3D=3D> 3dfx
 > >  cc -O -pipe   -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstr=
 ict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -=
 fformat-extensions -ansi -DKLD_MODULE -nostdinc -I-   -I. -I@ -I@/dev -I@/.=
 ./include -fno-common -g -mpreferred-stack-boundary=3D2 -Wall -Wredundant-d=
 ecls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-a=
 rith -Winline -Wcast-qual  -fformat-extensions -ansi -c /usr/src/sys/module=
 s/3dfx/../../dev/tdfx/tdfx_pci.c
 > >  ld  -d -warn-common -r -d -o 3dfx.kld tdfx_pci.o
 > >  touch /usr/obj/usr/src/sys/PYTHON/modules/usr/src/sys/modules/3dfx/exp=
 ort_syms
 > >  awk -f /usr/src/sys/modules/3dfx/../../conf/kmod_syms.awk 3dfx.kld /us=
 r/obj/usr/src/sys/PYTHON/modules/usr/src/sys/modules/3dfx/export_syms |  xa=
 rgs -J% objcopy % 3dfx.kld
 > >  xargs: illegal option -- J
 > >  usage: xargs [-0] [-t] [-n number [-x]] [-s size] [utility [argument
 > >  ...]]
 > >  *** Error code 1
 >=20
 > Looks like xargs(1) needs to be a cross tool too.
 >=20
 I will look into this as well (I just started building the 5.0-CURRENT world
 on 4.0-RELEASE box).  If we ever have a problem with xargs(1) we should add
 it to bootstrap-tools, not cross-tools.
 
 > BTW, I wrote up some kludgy patches to get kldxref(8) to build as a
 > cross tool as well after continued whining about the ignored error it
 > generates during installkernel on a 4-STABLE to 5-CURRENT upgrade (or
 > an upgrade from a really old 5-CURRENT). This might also fit in with
 > these issues.
 >=20
 For kldxref(8) to be a cross-tool, it should produce ${TARGET_ARCH} binary
 format.  If you managed to make it so, these patches would be highly
 appreciated.
 
 
 Cheers,
 --=20
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
 --ReaqsoxgOBHFXBhH
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE8sDQ+Ukv4P6juNwoRAmvzAJ0XGbDCSsPXbjGGcMy6r5QFr15deQCdFBsg
 WNs6dlDbk6XNxk6zwvM8eWw=
 =ix5c
 -----END PGP SIGNATURE-----
 
 --ReaqsoxgOBHFXBhH--
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Sun Apr 7 10:03:29 PDT 2002 
State-Changed-Why:  
Fixed in 5.0-CURRENT: 

share/mk/bsd.sys.mk,v 1.6 
usr.bin/xlint/lint1/main1.c,v 1.2 
usr.bin/xlint/xlint/xlint.c,v 1.19 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36747 

From: "Crist J. Clark" <crist.clark@attbi.com>
To: Thomas Quinot <thomas@cuivre.fr.eu.org>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/36747: [patch] Upgrade path from old -CURRENT is broken
Date: Sun, 7 Apr 2002 10:54:31 -0700

 On Sun, Apr 07, 2002 at 01:08:01PM +0200, Thomas Quinot wrote:
 > Le 2002-04-07, Crist J. Clark crivait :
 > 
 > > Problems like this would not crop up if that order was reversed, if
 > > the cross tools used the ${WORLDTMP}/usr/include. I expect that there
 > > is a good reason why the cross tools try to use the system's include
 > > files rather than the ones in the new source, but I'm not aware of
 > 
 > Well, cross tools are executed on the running (build) system, not on
 > the target...
 
 I realize that, but the most of problem you originally reported is due
 to inconsistencies between the new souce code in a cross tool and an
 old include file.
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

From: Ruslan Ermilov <ru@FreeBSD.org>
To: "Crist J. Clark" <crist.clark@attbi.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/36747: [patch] Upgrade path from old -CURRENT is broken
Date: Mon, 8 Apr 2002 10:21:23 +0300

 --ghzN8eJ9Qlbqn3iT
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sun, Apr 07, 2002 at 11:00:03AM -0700, Crist J. Clark wrote:
 > The following reply was made to PR bin/36747; it has been noted by GNATS.
 >=20
 > From: "Crist J. Clark" <crist.clark@attbi.com>
 > To: Thomas Quinot <thomas@cuivre.fr.eu.org>
 > Cc: FreeBSD-gnats-submit@FreeBSD.ORG
 > Subject: Re: bin/36747: [patch] Upgrade path from old -CURRENT is broken
 > Date: Sun, 7 Apr 2002 10:54:31 -0700
 >=20
 >  On Sun, Apr 07, 2002 at 01:08:01PM +0200, Thomas Quinot wrote:
 >  > Le 2002-04-07, Crist J. Clark =E9crivait :
 >  >=20
 >  > > Problems like this would not crop up if that order was reversed, if
 >  > > the cross tools used the ${WORLDTMP}/usr/include. I expect that there
 >  > > is a good reason why the cross tools try to use the system's include
 >  > > files rather than the ones in the new source, but I'm not aware of
 >  >=20
 >  > Well, cross tools are executed on the running (build) system, not on
 >  > the target...
 > =20
 >  I realize that, but the most of problem you originally reported is due
 >  to inconsistencies between the new souce code in a cross tool and an
 >  old include file.
 > =20
 Yes, that's what we call "bootstrapping problems".  :-)
 
 
 Cheers,
 --=20
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
 --ghzN8eJ9Qlbqn3iT
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE8sUTzUkv4P6juNwoRAhUfAJ9SqBHFmL3FC061TJ5ddIJboaFnyACePk3E
 21sLWW8Z+07xrHzmxrungo0=
 =8O8Z
 -----END PGP SIGNATURE-----
 
 --ghzN8eJ9Qlbqn3iT--

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Thomas Quinot <thomas@cuivre.fr.eu.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/36747 Upgrade path from old -CURRENT is broken
Date: Mon, 8 Apr 2002 10:41:25 +0300

 --yH1ZJFh+qWm+VodA
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Thu, Apr 04, 2002 at 08:40:05AM -0800, Thomas Quinot wrote:
 > It appears that the kernel build is borken as well:
 >=20
 > =3D=3D=3D> 3dfx
 > cc -O -pipe   -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict=
 -prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -ffo=
 rmat-extensions -ansi -DKLD_MODULE -nostdinc -I-   -I. -I@ -I@/dev -I@/../i=
 nclude -fno-common -g -mpreferred-stack-boundary=3D2 -Wall -Wredundant-decl=
 s -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arit=
 h -Winline -Wcast-qual  -fformat-extensions -ansi -c /usr/src/sys/modules/3=
 dfx/../../dev/tdfx/tdfx_pci.c
 > ld  -d -warn-common -r -d -o 3dfx.kld tdfx_pci.o
 > touch /usr/obj/usr/src/sys/PYTHON/modules/usr/src/sys/modules/3dfx/export=
 _syms
 > awk -f /usr/src/sys/modules/3dfx/../../conf/kmod_syms.awk 3dfx.kld /usr/o=
 bj/usr/src/sys/PYTHON/modules/usr/src/sys/modules/3dfx/export_syms |  xargs=
  -J% objcopy % 3dfx.kld
 > xargs: illegal option -- J
 > usage: xargs [-0] [-t] [-n number [-x]] [-s size] [utility [argument
 > ...]]
 > *** Error code 1
 >=20
 Fixed this in Makefile.inc1,v 1.250.  Thanks!
 
 
 Cheers,
 --=20
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
 --yH1ZJFh+qWm+VodA
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE8sUmkUkv4P6juNwoRAptuAJ0fsYsZmdK/UGv6RGJwK5r8Q9Dx0gCfYv0Y
 N67hNiy5XewnfalnDgY0gp4=
 =V+Os
 -----END PGP SIGNATURE-----
 
 --yH1ZJFh+qWm+VodA--
>Unformatted:
