From owner-cvs-all Tue Mar 19 0:40:51 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id D89BF37B404; Tue, 19 Mar 2002 00:40:45 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id TAA13651; Tue, 19 Mar 2002 19:40:31 +1100 Date: Tue, 19 Mar 2002 19:40:35 +1100 (EST) From: Bruce Evans X-X-Sender: To: Peter Wemm Cc: Bruce Evans , , Subject: Re: cvs commit: src/sys/conf kern.post.mk In-Reply-To: <20020319074947.F36BF3810@overcee.wemm.org> Message-ID: <20020319192107.A5281-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 18 Mar 2002, Peter Wemm wrote: > Bruce Evans wrote: > > bde 2002/03/18 22:30:24 PST > > > > Modified files: > > sys/conf kern.post.mk > > Log: > > Removed env(1) commands. make(1) uses a real shell, and > > "env name=value ... cmd ..." is just a pessimized way of doing > > "name=value ... cmd ..." in real shells. Set the environment > > (without using env(1)) before starting xargs so that env(1) > > is not needed in "xargs env name=value ... cmd ..." > > BZZT! Wrong! You broke cross compiles! > ... > ==== //depot/projects/ia64/sys/conf/kern.post.mk#5 - /home/peter/fbp4/ia64/sys/conf/kern.post.mk ==== > @@ -98,12 +98,10 @@ > ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} > if [ -f .olddep ]; then mv .olddep .depend; fi > rm -f .newdep > - MKDEP_CPP="${CC} -E" CC="${CC}" \ > - ${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | xargs \ > - mkdep -a -f .newdep ${CFLAGS} > - MKDEP_CPP="${CC} -E" \ > - ${MAKE} -V SFILES -V SYSTEM_SFILES | xargs \ > - mkdep -a -f .newdep ${ASM_CFLAGS} > + ${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | xargs \ > + env MKDEP_CPP="${CC} -E" CC="${CC}" mkdep -a -f .newdep ${CFLAGS} > + ${MAKE} -V SFILES -V SYSTEM_SFILES | xargs \ > + env MKDEP_CPP="${CC} -E" mkdep -a -f .newdep ${ASM_CFLAGS} > rm -f .depend > mv .newdep .depend > > The env commands are needed here, because xargs(1) doesn't understand it > otherwise. > > IMHO, this part of the change is completely bogus. You are overriding the > MKDEP_CPP and CC variables on the wrong command! Oops. I thought "name=value" affected the whole pipeline. It only affected the ${MAKE} part. Moving it to before the xargs part should work, but I haven't tested this and just backed out this part of the change. BTW, passing CC to mkdep seems to be bogus. We neglect to pass it for assembler files, but that is OK because mkdep only uses CC when MKDEP_CPP is not set. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message