On 3/12/07, Bryan Kadzban <[EMAIL PROTECTED]> wrote: > Dan Nicholson wrote: > > I noticed that ldd is > > a bash script and will fail silently for non-bash /bin/sh. > > And I briefly thought "well, could we patch ldd to make it POSIX?" > > Then I saw the script itself. Never mind. ;-)
Yeah, it's pretty hairy. Or, at least it has more knowledge about ld.so than I could claim to have. There is a target in the Makefile that seems like it tries to rewrite the script if configure didn't detect that you have bash-2+. You can look at the Makefile in elf/ and look for something like sh-ldd-rewrite. But we have bash, so I see no reason not to use it if that's what they had in mind. > > So, I'm proposing that we force > > /bin/bash as the shebang for ldd. Two possible ways are: > > > > 1. Prior to configure and changing dirs - sed -i 's|@BASH@|/bin/bash|' > > elf/ldd.in > > 2. Just override the var during make - make BASH=/bin/bash > > > > What do you guys think? > > I like 1. I'm not sure what else in the glibc autofoo may depend on the > value that configure comes up with for $BASH; hopefully there isn't > anything, but I don't think it's safe to depend on that. The first is > much more specific; it only targets the ldd script instead of everything > that uses $BASH. Seems like a good idea. I'll wait a bit longer to see if anyone else wants to chime in. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page