* config.guess: Don't use 'ldd --version' to determine the presence of

musl libc, as this fails on Alpine Linux 3.10.

Signed-off-by: Ben Elliston <bje@gnu.org>
This commit is contained in:
Bruno Haible 2020-09-20 14:21:00 +10:00 committed by Ben Elliston
parent e072cc210e
commit 4aa554d72b
2 changed files with 11 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2020-09-19 Bruno Haible <bruno@clisp.org>
* config.guess: Don't use 'ldd --version' to determine the presence of
musl libc, as this fails on Alpine Linux 3.10.
2020-09-08 Elad Lahav <e2lahav@gmail.com>
Ben Elliston <bje@gnu.org>

14
config.guess vendored
View File

@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2020-08-17'
timestamp='2020-09-19'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -150,17 +150,15 @@ Linux|GNU|GNU/*)
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
#include <stdarg.h>
#ifdef __DEFINED_va_list
LIBC=musl
#else
LIBC=gnu
#endif
#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