Thanks for the info. However, it seems that the referenced issue is only valid for the old version of Alpine. For the latest version, the `ldd --version` works just fine. As shown in the below, the old config.guess reports the correct result in a fresh alpine docker container, while the new config.guess does not. Therefore, I think we should just keep the original `ldd --version` check. There is no harm to do so.
$ docker run --rm -it -v $(pwd):/data -w /data alpine:latest
/data # ldd --version
musl libc (x86_64)
Version 1.1.24
Dynamic Program Loader
Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname
/data # ./config-2020-08-17.guess --version
GNU config.guess (2020-08-17)
Originally written by Per Bothner.
Copyright 1992-2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/data # ./config-2020-08-17.guess
x86_64-pc-linux-musl
/data # ./config-2020-10-22.guess --version
GNU config.guess (2020-10-22)
Originally written by Per Bothner.
Copyright 1992-2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/data # ./config-2020-10-22.guess
x86_64-pc-linux-gnu
Moreover, even if I install the compiler, the new config.guess still reports the incorrect result.
/data # apk add gcc
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/11) Installing libgcc (9.3.0-r2)
(2/11) Installing libstdc++ (9.3.0-r2)
(3/11) Installing binutils (2.34-r1)
(4/11) Installing gmp (6.2.0-r0)
(5/11) Installing isl (0.18-r0)
(6/11) Installing libgomp (9.3.0-r2)
(7/11) Installing libatomic (9.3.0-r2)
(8/11) Installing libgphobos (9.3.0-r2)
(9/11) Installing mpfr4 (4.0.2-r4)
(10/11) Installing mpc1 (1.1.0-r1)
(11/11) Installing gcc (9.3.0-r2)
Executing busybox-1.31.1-r19.trigger
OK: 129 MiB in 25 packages
/data # ./config-2020-10-22.guess
x86_64-pc-linux-gnu