On Fri, 2018-01-26 at 12:33 +1100, Ben Elliston wrote: > Hi Henri > > On Fri, Jan 26, 2018 at 11:28:31AM +1300, Henri wrote: > > > > > Sounds good to me. A new patch is attached. I had to pipe stderr > > to stdout though because musl ldd writes version info to stderr. > Here's a modified version of your patch. You shouldn't use command > substitution (`...`) but just run the commands within the if > expression. The 'then' side will be run if the expression succeeds, > eg: > > if grep root /etc/passwd ; then > ... > fi > > I am also using command -v to test for the presence of ldd. On some > Linux system, there are no development tools installed and we want to > protect against errors in this case. > > Can you please test this patch? If it's good, then I'll install it.
This patch works fine for me on Ubuntu 16.04 and Alpine 3.7. Sorry for sending such a low quality patch in the first place but I'm not a shell wizard like you :-) > > Thanks, > Ben > > diff --git a/config.guess b/config.guess > index ae5ffc7..89736b6 100755 > --- a/config.guess > +++ b/config.guess > @@ -150,6 +150,12 @@ Linux|GNU|GNU/*) > #endif > EOF > eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed > 's, ,,g'`" > + > + # if ldd exists, use it to detect musl libc > + if command -v ldd >/dev/null && \ > + ldd --version 2>&1 | grep -q ^musl; then > + LIBC=musl > + fi > ;; > esac > _______________________________________________ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches