Subject: Re: Cross building on a host with a bad /bin/sh
To: None <>
From: Alan Barrett <>
List: tech-toolchain
Date: 09/11/2006 23:29:22
On Mon, 11 Sep 2006, David Laight wrote:
> On Mon, Sep 11, 2006 at 10:00:47PM +0200, Alan Barrett wrote:
> > I have successfully built an i386 system using these patches in
> > a chroot environment in which /bin/sh was replaced with a wrapper
> > that logged every time it was invoked; it was invoked only because
> > /usr/bin/true starts with "#!/bin/sh".
> Hummm... what code is invoking /usr/bin/true ?
> The shell builtin (possibly :) should be used instead.

The shell builtin is usually used, but sometimes make decides to
just exec "true" instead of the equivalent of {sh -c "true"}.  See
src/usr.bin/make/compat.c near line 290 and near line 335.  It only
happens a few times during the entire build, possibly because make is
usually not running in compatibility mode.

--apb (Alan Barrett)