Date: Tue, 19 Mar 2002 19:40:35 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Peter Wemm <peter@wemm.org> Cc: Bruce Evans <bde@FreeBSD.org>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/conf kern.post.mk Message-ID: <20020319192107.A5281-100000@gamplex.bde.org> In-Reply-To: <20020319074947.F36BF3810@overcee.wemm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020319192107.A5281-100000>