Skip to content

Commit 2e8a0ae

Browse files
committed
Update config.guess, config.sub to their latest versions
- Primarily to allow the new GHC Javascript backend to build network.
1 parent 0505db5 commit 2e8a0ae

File tree

2 files changed

+256
-107
lines changed

2 files changed

+256
-107
lines changed

config.guess

+88-24
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#! /bin/sh
22
# Attempt to guess a canonical system name.
3-
# Copyright 1992-2021 Free Software Foundation, Inc.
3+
# Copyright 1992-2024 Free Software Foundation, Inc.
44

55
# shellcheck disable=SC2006,SC2268 # see below for rationale
66

7-
timestamp='2021-06-03'
7+
timestamp='2024-01-01'
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
11-
# the Free Software Foundation; either version 3 of the License, or
11+
# the Free Software Foundation, either version 3 of the License, or
1212
# (at your option) any later version.
1313
#
1414
# This program is distributed in the hope that it will be useful, but
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
4747
usage="\
4848
Usage: $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
5252
Options:
5353
-h, --help print this help, then exit
@@ -60,13 +60,13 @@ version="\
6060
GNU config.guess ($timestamp)
6161
6262
Originally written by Per Bothner.
63-
Copyright 1992-2021 Free Software Foundation, Inc.
63+
Copyright 1992-2024 Free Software Foundation, Inc.
6464
6565
This is free software; see the source for copying conditions. There is NO
6666
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6767

6868
help="
69-
Try \`$me --help' for more information."
69+
Try '$me --help' for more information."
7070

7171
# Parse command line
7272
while 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,20 +155,26 @@ 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
161164
#elif defined(__dietlibc__)
162165
LIBC=dietlibc
163166
#elif defined(__GLIBC__)
164167
LIBC=gnu
168+
#elif defined(__LLVM_LIBC__)
169+
LIBC=llvm
165170
#else
166171
#include <stdarg.h>
167172
/* First heuristic to detect musl libc. */
168173
#ifdef __DEFINED_va_list
169174
LIBC=musl
170175
#endif
171176
#endif
177+
#endif
172178
EOF
173179
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
174180
eval "$cc_set_libc"
@@ -437,7 +443,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
437443
# This test works for both compilers.
438444
if test "$CC_FOR_BUILD" != no_compiler_found; then
439445
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
440-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
446+
(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
441447
grep IS_64BIT_ARCH >/dev/null
442448
then
443449
SUN_ARCH=x86_64
@@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
459465
UNAME_RELEASE=`uname -v`
460466
;;
461467
esac
462-
# Japanese Language versions have a version number like `4.1.3-JL'.
468+
# Japanese Language versions have a version number like '4.1.3-JL'.
463469
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464470
GUESS=sparc-sun-sunos$SUN_REL
465471
;;
@@ -904,7 +910,7 @@ EOF
904910
fi
905911
;;
906912
*:FreeBSD:*:*)
907-
UNAME_PROCESSOR=`/usr/bin/uname -p`
913+
UNAME_PROCESSOR=`uname -p`
908914
case $UNAME_PROCESSOR in
909915
amd64)
910916
UNAME_PROCESSOR=x86_64 ;;
@@ -929,6 +935,9 @@ EOF
929935
i*:PW*:*)
930936
GUESS=$UNAME_MACHINE-pc-pw32
931937
;;
938+
*:SerenityOS:*:*)
939+
GUESS=$UNAME_MACHINE-pc-serenity
940+
;;
932941
*:Interix*:*)
933942
case $UNAME_MACHINE in
934943
x86)
@@ -963,11 +972,37 @@ EOF
963972
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
964973
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
965974
;;
975+
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
976+
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
977+
;;
978+
*:[Mm]anagarm:*:*)
979+
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
980+
;;
966981
*:Minix:*:*)
967982
GUESS=$UNAME_MACHINE-unknown-minix
968983
;;
969984
aarch64:Linux:*:*)
970-
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
9711006
;;
9721007
aarch64_be:Linux:*:*)
9731008
UNAME_MACHINE=aarch64_be
@@ -1033,7 +1068,16 @@ EOF
10331068
k1om:Linux:*:*)
10341069
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10351070
;;
1036-
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
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+
;;
1080+
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
10371081
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10381082
;;
10391083
m32r*:Linux:*:*)
@@ -1148,16 +1192,27 @@ EOF
11481192
;;
11491193
x86_64:Linux:*:*)
11501194
set_cc_for_build
1195+
CPU=$UNAME_MACHINE
11511196
LIBCABI=$LIBC
11521197
if test "$CC_FOR_BUILD" != no_compiler_found; then
1153-
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1154-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1155-
grep IS_X32 >/dev/null
1156-
then
1157-
LIBCABI=${LIBC}x32
1158-
fi
1198+
ABI=64
1199+
sed 's/^ //' << EOF > "$dummy.c"
1200+
#ifdef __i386__
1201+
ABI=x86
1202+
#else
1203+
#ifdef __ILP32__
1204+
ABI=x32
1205+
#endif
1206+
#endif
1207+
EOF
1208+
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
1209+
eval "$cc_set_abi"
1210+
case $ABI in
1211+
x86) CPU=i686 ;;
1212+
x32) LIBCABI=${LIBC}x32 ;;
1213+
esac
11591214
fi
1160-
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1215+
GUESS=$CPU-pc-linux-$LIBCABI
11611216
;;
11621217
xtensa*:Linux:*:*)
11631218
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
@@ -1177,7 +1232,7 @@ EOF
11771232
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
11781233
;;
11791234
i*86:OS/2:*:*)
1180-
# If we were able to find `uname', then EMX Unix compatibility
1235+
# If we were able to find 'uname', then EMX Unix compatibility
11811236
# is probably installed.
11821237
GUESS=$UNAME_MACHINE-pc-os2-emx
11831238
;;
@@ -1318,7 +1373,7 @@ EOF
13181373
GUESS=ns32k-sni-sysv
13191374
fi
13201375
;;
1321-
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1376+
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
13221377
13231378
GUESS=i586-unisys-sysv4
13241379
;;
@@ -1364,8 +1419,11 @@ EOF
13641419
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
13651420
GUESS=i586-pc-haiku
13661421
;;
1367-
x86_64:Haiku:*:*)
1368-
GUESS=x86_64-unknown-haiku
1422+
ppc:Haiku:*:*) # Haiku running on Apple PowerPC
1423+
GUESS=powerpc-apple-haiku
1424+
;;
1425+
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
1426+
GUESS=$UNAME_MACHINE-unknown-haiku
13691427
;;
13701428
SX-4:SUPER-UX:*:*)
13711429
GUESS=sx4-nec-superux$UNAME_RELEASE
@@ -1522,6 +1580,9 @@ EOF
15221580
i*86:rdos:*:*)
15231581
GUESS=$UNAME_MACHINE-pc-rdos
15241582
;;
1583+
i*86:Fiwix:*:*)
1584+
GUESS=$UNAME_MACHINE-pc-fiwix
1585+
;;
15251586
*:AROS:*:*)
15261587
GUESS=$UNAME_MACHINE-unknown-aros
15271588
;;
@@ -1534,6 +1595,9 @@ EOF
15341595
*:Unleashed:*:*)
15351596
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
15361597
;;
1598+
*:Ironclad:*:*)
1599+
GUESS=$UNAME_MACHINE-unknown-ironclad
1600+
;;
15371601
esac
15381602

15391603
# Do we have a guess based on uname results?

0 commit comments

Comments
 (0)