|
1 | 1 | #!/usr/bin/sh
|
2 | 2 | # Attempt to guess a canonical system name.
|
3 |
| -# Copyright 1992-2023 Free Software Foundation, Inc. |
| 3 | +# Copyright 1992-2024 Free Software Foundation, Inc. |
4 | 4 |
|
5 | 5 | # shellcheck disable=SC2006,SC2268 # see below for rationale
|
6 | 6 |
|
7 |
| -timestamp='2023-06-23' |
| 7 | +timestamp='2024-01-01' |
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
|
@@ -60,7 +60,7 @@ version="\
|
60 | 60 | GNU config.guess ($timestamp)
|
61 | 61 |
|
62 | 62 | Originally written by Per Bothner.
|
63 |
| -Copyright 1992-2023 Free Software Foundation, Inc. |
| 63 | +Copyright 1992-2024 Free Software Foundation, Inc. |
64 | 64 |
|
65 | 65 | 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."
|
@@ -155,20 +155,26 @@ 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
|
161 | 164 | #elif defined(__dietlibc__)
|
162 | 165 | LIBC=dietlibc
|
163 | 166 | #elif defined(__GLIBC__)
|
164 | 167 | LIBC=gnu
|
| 168 | + #elif defined(__LLVM_LIBC__) |
| 169 | + LIBC=llvm |
165 | 170 | #else
|
166 | 171 | #include <stdarg.h>
|
167 | 172 | /* First heuristic to detect musl libc. */
|
168 | 173 | #ifdef __DEFINED_va_list
|
169 | 174 | LIBC=musl
|
170 | 175 | #endif
|
171 | 176 | #endif
|
| 177 | + #endif |
172 | 178 | EOF
|
173 | 179 | cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
174 | 180 | eval "$cc_set_libc"
|
|
904 | 910 | fi
|
905 | 911 | ;;
|
906 | 912 | *:FreeBSD:*:*)
|
907 |
| - UNAME_PROCESSOR=`/usr/bin/uname -p` |
| 913 | + UNAME_PROCESSOR=`uname -p` |
908 | 914 | case $UNAME_PROCESSOR in
|
909 | 915 | amd64)
|
910 | 916 | UNAME_PROCESSOR=x86_64 ;;
|
|
976 | 982 | GUESS=$UNAME_MACHINE-unknown-minix
|
977 | 983 | ;;
|
978 | 984 | aarch64:Linux:*:*)
|
979 |
| - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 985 | + set_cc_for_build |
| 986 | + CPU=$UNAME_MACHINE |
| 987 | + LIBCABI=$LIBC |
| 988 | + if test "$CC_FOR_BUILD" != no_compiler_found; then |
| 989 | + ABI=64 |
| 990 | + sed 's/^ //' << EOF > "$dummy.c" |
| 991 | + #ifdef __ARM_EABI__ |
| 992 | + #ifdef __ARM_PCS_VFP |
| 993 | + ABI=eabihf |
| 994 | + #else |
| 995 | + ABI=eabi |
| 996 | + #endif |
| 997 | + #endif |
| 998 | +EOF |
| 999 | + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` |
| 1000 | + eval "$cc_set_abi" |
| 1001 | + case $ABI in |
| 1002 | + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; |
| 1003 | + esac |
| 1004 | + fi |
| 1005 | + GUESS=$CPU-unknown-linux-$LIBCABI |
980 | 1006 | ;;
|
981 | 1007 | aarch64_be:Linux:*:*)
|
982 | 1008 | UNAME_MACHINE=aarch64_be
|
@@ -1042,6 +1068,15 @@ EOF
|
1042 | 1068 | k1om:Linux:*:*)
|
1043 | 1069 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
1044 | 1070 | ;;
|
| 1071 | + kvx:Linux:*:*) |
| 1072 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1073 | + ;; |
| 1074 | + kvx:cos:*:*) |
| 1075 | + GUESS=$UNAME_MACHINE-unknown-cos |
| 1076 | + ;; |
| 1077 | + kvx:mbr:*:*) |
| 1078 | + GUESS=$UNAME_MACHINE-unknown-mbr |
| 1079 | + ;; |
1045 | 1080 | loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
1046 | 1081 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
1047 | 1082 | ;;
|
@@ -1560,6 +1595,9 @@ EOF
|
1560 | 1595 | *:Unleashed:*:*)
|
1561 | 1596 | GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
1562 | 1597 | ;;
|
| 1598 | + *:Ironclad:*:*) |
| 1599 | + GUESS=$UNAME_MACHINE-unknown-ironclad |
| 1600 | + ;; |
1563 | 1601 | esac
|
1564 | 1602 |
|
1565 | 1603 | # Do we have a guess based on uname results?
|
|
0 commit comments