llvm-gcc4 & mingw32 & bash

Hello, Everyone.

All blackmagic (playing with pwd, etc) in my build description has
gone with patched bash (pwd builtin was just hardly disabled). It's
not good, I myself prefer modifying libstdc++ configure script to use
PWD_CMD environmental variable as main gcc ones. I'm working on this
feature.

I'm a little confused by this message:
Do I still need to do the "black magic"?
What is this patched version of bash (do you have a patch, where do I get
it?)
What does "pwd builtin was just hardly disabled" mean?

Thanks.

Hello, Greg.

You wrote Sunday, May 14, 2006, 5:21:49 PM:

Do I still need to do the "black magic"?

In fact, yes.

What is this patched version of bash (do you have a patch, where do I get
it?) What does "pwd builtin was just hardly disabled" mean?

There are some set of built-in commands in bash (they are called
"builtins"). For example "echo", "pwd", etc. Some other commands are
just binaries in /usr/bin directory. Our goal it to get paths like
"drive:/path" from pwd, not "/drive/path". We can tunnel output of
/usr/bin/pwd thru cygpath to get correct path. But this won't work,
since /usr/bin/pwd is not actually called, because of presence of
builtin.

We should disable that builtin to get everything work. Well, we can
done it executing "enable -n pwd" in .bashrc script. But this won't
work, since configure scripts are executing in non-interactive mode.
We can set up BASH_ENV environmental variable to point to some script,
which will be called during initialize.

But this again won't work. Configure's are executing in "bash-as-sh"
mode. It ignores BASH_ENV variable and even more - it ignores ENV
variable, which should work as BASH_ENV in this case. That's why all
that magic exists.

Another way - patch bash and disable pwd builtin by default. This is
not good at all. But it works :wink: Mine patchjust directly patches
bash.exe excutable, so it isn't usable on the systems, different than
mine.

The most fine way is to modify configure scripts for libstdc++ to
allow them use PWD_CMD by default as other configures (gcc, etc) does.
I'm currently working on this feature.