4
4
5
5
# shellcheck disable=SC2006,SC2268 # see below for rationale
6
6
7
- timestamp=' 2023-01-01 '
7
+ timestamp=' 2023-08-22 '
8
8
9
9
# This file is free software; you can redistribute it and/or modify it
10
10
# under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
47
47
usage=" \
48
48
Usage: $0 [OPTION]
49
49
50
- Output the configuration name of the system \` $me ' is run on.
50
+ Output the configuration name of the system ' $me ' is run on.
51
51
52
52
Options:
53
53
-h, --help print this help, then exit
@@ -66,7 +66,7 @@ This is free software; see the source for copying conditions. There is NO
66
66
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
67
67
68
68
help="
69
- Try \` $me --help' for more information."
69
+ Try ' $me --help' for more information."
70
70
71
71
# Parse command line
72
72
while test $# -gt 0 ; do
@@ -102,8 +102,8 @@ GUESS=
102
102
# temporary files to be created and, as you can see below, it is a
103
103
# headache to deal with in a portable fashion.
104
104
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.
107
107
108
108
# Portable tmp directory creation inspired by the Autoconf team.
109
109
@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
155
155
156
156
set_cc_for_build
157
157
cat << -EOF > "$dummy .c"
158
+ #if defined(__ANDROID__)
159
+ LIBC=android
160
+ #else
158
161
#include <features.h>
159
162
#if defined(__UCLIBC__)
160
163
LIBC=uclibc
@@ -169,6 +172,7 @@ Linux|GNU|GNU/*)
169
172
LIBC=musl
170
173
#endif
171
174
#endif
175
+ #endif
172
176
EOF
173
177
cc_set_libc=` $CC_FOR_BUILD -E " $dummy .c" 2> /dev/null | grep ' ^LIBC' | sed ' s, ,,g' `
174
178
eval " $cc_set_libc "
@@ -459,7 +463,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
459
463
UNAME_RELEASE=` uname -v`
460
464
;;
461
465
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'.
463
467
SUN_REL=` echo " $UNAME_RELEASE " | sed -e ' s/-/_/' `
464
468
GUESS=sparc-sun-sunos$SUN_REL
465
469
;;
904
908
fi
905
909
;;
906
910
* :FreeBSD:* :* )
907
- UNAME_PROCESSOR=` /usr/bin/ uname -p`
911
+ UNAME_PROCESSOR=` uname -p`
908
912
case $UNAME_PROCESSOR in
909
913
amd64)
910
914
UNAME_PROCESSOR=x86_64 ;;
976
980
GUESS=$UNAME_MACHINE -unknown-minix
977
981
;;
978
982
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
980
1004
;;
981
1005
aarch64_be:Linux:* :* )
982
1006
UNAME_MACHINE=aarch64_be
@@ -1042,6 +1066,15 @@ EOF
1042
1066
k1om:Linux:* :* )
1043
1067
GUESS=$UNAME_MACHINE -unknown-linux-$LIBC
1044
1068
;;
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
+ ;;
1045
1078
loongarch32:Linux:* :* | loongarch64:Linux:* :* )
1046
1079
GUESS=$UNAME_MACHINE -unknown-linux-$LIBC
1047
1080
;;
@@ -1197,7 +1230,7 @@ EOF
1197
1230
GUESS=$UNAME_MACHINE -pc-sysv4.2uw$UNAME_VERSION
1198
1231
;;
1199
1232
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
1201
1234
# is probably installed.
1202
1235
GUESS=$UNAME_MACHINE -pc-os2-emx
1203
1236
;;
@@ -1338,7 +1371,7 @@ EOF
1338
1371
GUESS=ns32k-sni-sysv
1339
1372
fi
1340
1373
;;
1341
- PENTIUM:* :4.0* :* ) # Unisys ` ClearPath HMP IX 4000' SVR4/MP effort
1374
+ PENTIUM:* :4.0* :* ) # Unisys ' ClearPath HMP IX 4000' SVR4/MP effort
1342
1375
1343
1376
GUESS=i586-unisys-sysv4
1344
1377
;;
0 commit comments