From owner-freebsd-arch@FreeBSD.ORG Fri Jul 25 16:08:42 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05EF237B401 for ; Fri, 25 Jul 2003 16:08:42 -0700 (PDT) Received: from ns1.gnf.org (ns1.gnf.org [63.196.132.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0E8343F93 for ; Fri, 25 Jul 2003 16:08:40 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: from EXCHCLUSTER01.lj.gnf.org (exch01.lj.gnf.org [172.25.10.19]) by ns1.gnf.org (8.12.8p1/8.12.8) with ESMTP id h6PN8ctF060659 for ; Fri, 25 Jul 2003 16:08:38 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: from roark.gnf.org ([172.25.24.15]) by EXCHCLUSTER01.lj.gnf.org with Microsoft SMTPSVC(5.0.2195.5329); Fri, 25 Jul 2003 16:08:40 -0700 Received: from roark.gnf.org (localhost [127.0.0.1]) by roark.gnf.org (8.12.9/8.12.9) with ESMTP id h6PN8ei2074915 for ; Fri, 25 Jul 2003 16:08:40 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: (from gtetlow@localhost) by roark.gnf.org (8.12.9/8.12.9/Submit) id h6PN8eOs074914 for arch@FreeBSD.org; Fri, 25 Jul 2003 16:08:40 -0700 (PDT) Date: Fri, 25 Jul 2003 16:08:39 -0700 From: Gordon Tetlow To: arch@FreeBSD.org Message-ID: <20030725230839.GR12996@roark.gnf.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="o+XGOUgEmmuBaVbd" Content-Disposition: inline User-Agent: Mutt/1.4i X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-OriginalArrivalTime: 25 Jul 2003 23:08:40.0448 (UTC) FILETIME=[AFB56800:01C35301] Subject: Patch to crunchgen to fix errors using make -P X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 23:08:42 -0000 --o+XGOUgEmmuBaVbd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Bill Fenner reported a problem with crunchgen relating to the use of make -j # -P when building rescue. By running make -j # -P in src/rescue/rescue you get the following type of error: crunchgen: make error: Remaking `crunchgen_objs' =09 crunchgen: make error: Results of making crunchgen_objs: =09 crunchgen: make error:=20 =09 crunchgen: make error: Remaking `loop' =09 crunchgen: make error: Results of making loop: =09 crunchgen: make error:=20 This stems from the problem that crunchgen itself invokes make(1) to do some work and the extra output generated by the -P flag confuses crunchgen. I have a quick patch that I'd like to commit, but I was wondering if anyone had any objections or reason to keep the MAKEFLAGS environment variable. -gordon --- //depot/vendor/freebsd/src/usr.sbin/crunch/crunchgen/crunchgen.c 200= 3/04/22 21:37:08 +++ //depot/user/gordon/dynamic/src/usr.sbin/crunch/crunchgen/crunchgen.c20= 03/07/25 16:02:35 @@ -700,6 +700,12 @@ =20 fclose(f); =20 + /* + * We need to whack the MAKEFLAGs env variable to protect crunchgen + * from dangerous flags like -P that influence the resulting output. + */ + unsetenv("MAKEFLAGS"); + snprintf(line, MAXLINELEN, "cd %s && make -f %s crunchgen_objs 2>&1= ", p->srcdir, tempfname); if ((f =3D popen(line, "r")) =3D=3D NULL) { --o+XGOUgEmmuBaVbd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/Ibh3Ru2t9DV9ZfsRAuI1AKC54oiWeKjIzqVRTiTDhTOFaummcQCgi8rg HrA9IKkKlrwktHvYHm371xY= =67k0 -----END PGP SIGNATURE----- --o+XGOUgEmmuBaVbd--