On Mon, 2005-12-19 at 13:58, Daniel Jacobowitz wrote: > > I suspect that if you run a bootstrap of gcc on Linux with > > PWDCMD=/bin/pwd it will fail too. > > Yes, I saw a suggestion about this on IRC, but I tried it - it doesn't > fail. The path that matters is not one ever returned by PWDCMD but the > one seen in $PWD by GCC; the only cd that's happened at that point is > done in the shell, by the toplevel Makefile, into 'gcc'.
Hmm, so it's cd that's 'at fault'... Here's a snippet from the NetBSD sh(1) man page: pwd [-LP] Print the current directory. If -L is specified the cached value (initially set from PWD) is checked to see if it refers to the current directory, if it does the value is printed. Otherwise the current directory name is found using getcwd(3). The environment variable PWD is set to printed value. The default is pwd -L, but note that the builtin cd command doesn't currently support -L or -P and will cache (almost) the absolute path. If cd is changed, pwd may be changed to default to pwd -P.