From 3d00f60242f1726fc6eaa38e09435a969ee7ebe5 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 26 Jan 2018 14:04:08 +1100 Subject: [PATCH] * config.guess: Try to detect musl libc on GNU/Linux systems using ldd --version. Signed-off-by: Ben Elliston --- ChangeLog | 5 +++++ config.guess | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0d3ef3b..4ee237c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-01-26 Henri Menke + + * config.guess: Try to detect musl libc on GNU/Linux systems using + ldd --version. + 2018-01-16 Ben Elliston * config.guess: Use double quotes on any remaining unquoted diff --git a/config.guess b/config.guess index ae5ffc7..9baaa27 100755 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-01-16' +timestamp='2018-01-26' # 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,6 +150,13 @@ 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