The tests assume that a Linux system without a given libc will return
`-gnu`; however, on a musl libc host, the check for `ldd --version`
will fire and cause the tests to fail because they return `-musl`.

Signed-off-by: Anna Wilcox <[email protected]>
---
 Makefile                  | 2 +-
 testsuite/config-guess.sh | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c5dee55..c8ce748 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ check: check-guess check-sub
 manpages: doc/config.guess.1 doc/config.sub.1
 
 check-guess:
-       cd testsuite && bash config-guess.sh && rm uname
+       cd testsuite && bash config-guess.sh && rm uname ldd
 
 check-sub:
        cd testsuite && bash config-sub.sh
diff --git a/testsuite/config-guess.sh b/testsuite/config-guess.sh
index e472766..afb4e46 100644
--- a/testsuite/config-guess.sh
+++ b/testsuite/config-guess.sh
@@ -45,6 +45,13 @@ EOF
        return $rc
 }
 
+# Needed so the tests will emit -gnu instead of -musl when testing on a musl 
libc system.
+cat > ./ldd << EOF
+#!/bin/sh
+true
+EOF
+chmod +x ldd
+
 if sed 's, | ,|,g' < config-guess.data | run_config_guess ; then
        numtests=$(wc -l config-guess.data | cut -d' ' -f1)
        $verbose || echo "PASS: config.guess checks ($numtests tests)"
-- 
2.52.0


Reply via email to