44
55# shellcheck disable=SC2006,SC2268 # see below for rationale
66
7- timestamp=' 2023-01-01 '
7+ timestamp=' 2023-08-22 '
88
99# This file is free software; you can redistribute it and/or modify it
1010# under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
4747usage=" \
4848Usage: $0 [OPTION]
4949
50- Output the configuration name of the system \` $me ' is run on.
50+ Output the configuration name of the system ' $me ' is run on.
5151
5252Options:
5353 -h, --help print this help, then exit
@@ -66,7 +66,7 @@ This is free software; see the source for copying conditions. There is NO
6666warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6767
6868help="
69- Try \` $me --help' for more information."
69+ Try ' $me --help' for more information."
7070
7171# Parse command line
7272while test $# -gt 0 ; do
@@ -102,8 +102,8 @@ GUESS=
102102# temporary files to be created and, as you can see below, it is a
103103# headache to deal with in a portable fashion.
104104
105- # Historically, ` CC_FOR_BUILD' used to be named ` HOST_CC'. We still
106- # use ` HOST_CC' if defined, but it is deprecated.
105+ # Historically, ' CC_FOR_BUILD' used to be named ' HOST_CC'. We still
106+ # use ' HOST_CC' if defined, but it is deprecated.
107107
108108# Portable tmp directory creation inspired by the Autoconf team.
109109
@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
155155
156156 set_cc_for_build
157157 cat << -EOF > "$dummy .c"
158+ #if defined(__ANDROID__)
159+ LIBC=android
160+ #else
158161 #include <features.h>
159162 #if defined(__UCLIBC__)
160163 LIBC=uclibc
@@ -169,6 +172,7 @@ Linux|GNU|GNU/*)
169172 LIBC=musl
170173 #endif
171174 #endif
175+ #endif
172176 EOF
173177 cc_set_libc=` $CC_FOR_BUILD -E " $dummy .c" 2> /dev/null | grep ' ^LIBC' | sed ' s, ,,g' `
174178 eval " $cc_set_libc "
@@ -459,7 +463,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
459463 UNAME_RELEASE=` uname -v`
460464 ;;
461465 esac
462- # Japanese Language versions have a version number like ` 4.1.3-JL'.
466+ # Japanese Language versions have a version number like ' 4.1.3-JL'.
463467 SUN_REL=` echo " $UNAME_RELEASE " | sed -e ' s/-/_/' `
464468 GUESS=sparc-sun-sunos$SUN_REL
465469 ;;
904908 fi
905909 ;;
906910 * :FreeBSD:* :* )
907- UNAME_PROCESSOR=` /usr/bin/ uname -p`
911+ UNAME_PROCESSOR=` uname -p`
908912 case $UNAME_PROCESSOR in
909913 amd64)
910914 UNAME_PROCESSOR=x86_64 ;;
976980 GUESS=$UNAME_MACHINE -unknown-minix
977981 ;;
978982 aarch64:Linux:* :* )
979- GUESS=$UNAME_MACHINE -unknown-linux-$LIBC
983+ set_cc_for_build
984+ CPU=$UNAME_MACHINE
985+ LIBCABI=$LIBC
986+ if test " $CC_FOR_BUILD " ! = no_compiler_found; then
987+ ABI=64
988+ sed ' s/^ //' << EOF > "$dummy .c"
989+ #ifdef __ARM_EABI__
990+ #ifdef __ARM_PCS_VFP
991+ ABI=eabihf
992+ #else
993+ ABI=eabi
994+ #endif
995+ #endif
996+ EOF
997+ cc_set_abi=` $CC_FOR_BUILD -E " $dummy .c" 2> /dev/null | grep ' ^ABI' | sed ' s, ,,g' `
998+ eval " $cc_set_abi "
999+ case $ABI in
1000+ eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
1001+ esac
1002+ fi
1003+ GUESS=$CPU -unknown-linux-$LIBCABI
9801004 ;;
9811005 aarch64_be:Linux:* :* )
9821006 UNAME_MACHINE=aarch64_be
@@ -1042,6 +1066,15 @@ EOF
10421066 k1om:Linux:* :* )
10431067 GUESS=$UNAME_MACHINE -unknown-linux-$LIBC
10441068 ;;
1069+ kvx:Linux:* :* )
1070+ GUESS=$UNAME_MACHINE -unknown-linux-$LIBC
1071+ ;;
1072+ kvx:cos:* :* )
1073+ GUESS=$UNAME_MACHINE -unknown-cos
1074+ ;;
1075+ kvx:mbr:* :* )
1076+ GUESS=$UNAME_MACHINE -unknown-mbr
1077+ ;;
10451078 loongarch32:Linux:* :* | loongarch64:Linux:* :* )
10461079 GUESS=$UNAME_MACHINE -unknown-linux-$LIBC
10471080 ;;
@@ -1197,7 +1230,7 @@ EOF
11971230 GUESS=$UNAME_MACHINE -pc-sysv4.2uw$UNAME_VERSION
11981231 ;;
11991232 i* 86:OS/2:* :* )
1200- # If we were able to find ` uname', then EMX Unix compatibility
1233+ # If we were able to find ' uname', then EMX Unix compatibility
12011234 # is probably installed.
12021235 GUESS=$UNAME_MACHINE -pc-os2-emx
12031236 ;;
@@ -1338,7 +1371,7 @@ EOF
13381371 GUESS=ns32k-sni-sysv
13391372 fi
13401373 ;;
1341- PENTIUM:* :4.0* :* ) # Unisys ` ClearPath HMP IX 4000' SVR4/MP effort
1374+ PENTIUM:* :4.0* :* ) # Unisys ' ClearPath HMP IX 4000' SVR4/MP effort
13421375 # says <Richard.M.Bartel@ccMail.Census.GOV>
13431376 GUESS=i586-unisys-sysv4
13441377 ;;
0 commit comments