Skip to content

Commit cbd903d

Browse files
authored
Update config.guess to 2023-06-23 and config.sub to 2023-06-26 (php#11711)
``` wget -O config.guess https://git.savannah.gnu.org/cgit/config.git/plain/config.guess wget -O config.sub https://git.savannah.gnu.org/cgit/config.git/plain/config.sub ```
1 parent e413419 commit cbd903d

File tree

2 files changed

+97
-41
lines changed

2 files changed

+97
-41
lines changed

build/config.guess

+48-22
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-2023 Free Software Foundation, Inc.
44

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

7-
timestamp='2021-06-03'
7+
timestamp='2023-06-23'
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-2023 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

@@ -437,7 +437,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
437437
# This test works for both compilers.
438438
if test "$CC_FOR_BUILD" != no_compiler_found; then
439439
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
440-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
440+
(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
441441
grep IS_64BIT_ARCH >/dev/null
442442
then
443443
SUN_ARCH=x86_64
@@ -459,7 +459,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
459459
UNAME_RELEASE=`uname -v`
460460
;;
461461
esac
462-
# Japanese Language versions have a version number like `4.1.3-JL'.
462+
# Japanese Language versions have a version number like '4.1.3-JL'.
463463
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464464
GUESS=sparc-sun-sunos$SUN_REL
465465
;;
@@ -929,6 +929,9 @@ EOF
929929
i*:PW*:*)
930930
GUESS=$UNAME_MACHINE-pc-pw32
931931
;;
932+
*:SerenityOS:*:*)
933+
GUESS=$UNAME_MACHINE-pc-serenity
934+
;;
932935
*:Interix*:*)
933936
case $UNAME_MACHINE in
934937
x86)
@@ -963,6 +966,12 @@ EOF
963966
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
964967
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
965968
;;
969+
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
970+
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
971+
;;
972+
*:[Mm]anagarm:*:*)
973+
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
974+
;;
966975
*:Minix:*:*)
967976
GUESS=$UNAME_MACHINE-unknown-minix
968977
;;
@@ -1033,7 +1042,7 @@ EOF
10331042
k1om:Linux:*:*)
10341043
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10351044
;;
1036-
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1045+
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
10371046
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10381047
;;
10391048
m32r*:Linux:*:*)
@@ -1148,16 +1157,27 @@ EOF
11481157
;;
11491158
x86_64:Linux:*:*)
11501159
set_cc_for_build
1160+
CPU=$UNAME_MACHINE
11511161
LIBCABI=$LIBC
11521162
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
1163+
ABI=64
1164+
sed 's/^ //' << EOF > "$dummy.c"
1165+
#ifdef __i386__
1166+
ABI=x86
1167+
#else
1168+
#ifdef __ILP32__
1169+
ABI=x32
1170+
#endif
1171+
#endif
1172+
EOF
1173+
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
1174+
eval "$cc_set_abi"
1175+
case $ABI in
1176+
x86) CPU=i686 ;;
1177+
x32) LIBCABI=${LIBC}x32 ;;
1178+
esac
11591179
fi
1160-
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1180+
GUESS=$CPU-pc-linux-$LIBCABI
11611181
;;
11621182
xtensa*:Linux:*:*)
11631183
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
@@ -1177,7 +1197,7 @@ EOF
11771197
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
11781198
;;
11791199
i*86:OS/2:*:*)
1180-
# If we were able to find `uname', then EMX Unix compatibility
1200+
# If we were able to find 'uname', then EMX Unix compatibility
11811201
# is probably installed.
11821202
GUESS=$UNAME_MACHINE-pc-os2-emx
11831203
;;
@@ -1318,7 +1338,7 @@ EOF
13181338
GUESS=ns32k-sni-sysv
13191339
fi
13201340
;;
1321-
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1341+
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
13221342
13231343
GUESS=i586-unisys-sysv4
13241344
;;
@@ -1364,8 +1384,11 @@ EOF
13641384
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
13651385
GUESS=i586-pc-haiku
13661386
;;
1367-
x86_64:Haiku:*:*)
1368-
GUESS=x86_64-unknown-haiku
1387+
ppc:Haiku:*:*) # Haiku running on Apple PowerPC
1388+
GUESS=powerpc-apple-haiku
1389+
;;
1390+
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
1391+
GUESS=$UNAME_MACHINE-unknown-haiku
13691392
;;
13701393
SX-4:SUPER-UX:*:*)
13711394
GUESS=sx4-nec-superux$UNAME_RELEASE
@@ -1522,6 +1545,9 @@ EOF
15221545
i*86:rdos:*:*)
15231546
GUESS=$UNAME_MACHINE-pc-rdos
15241547
;;
1548+
i*86:Fiwix:*:*)
1549+
GUESS=$UNAME_MACHINE-pc-fiwix
1550+
;;
15251551
*:AROS:*:*)
15261552
GUESS=$UNAME_MACHINE-unknown-aros
15271553
;;

build/config.sub

+49-19
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#! /bin/sh
22
# Configuration validation subroutine script.
3-
# Copyright 1992-2021 Free Software Foundation, Inc.
3+
# Copyright 1992-2023 Free Software Foundation, Inc.
44

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

7-
timestamp='2021-08-14'
7+
timestamp='2023-06-26'
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
@@ -76,13 +76,13 @@ Report bugs and patches to <[email protected]>."
7676
version="\
7777
GNU config.sub ($timestamp)
7878
79-
Copyright 1992-2021 Free Software Foundation, Inc.
79+
Copyright 1992-2023 Free Software Foundation, Inc.
8080
8181
This is free software; see the source for copying conditions. There is NO
8282
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8383

8484
help="
85-
Try \`$me --help' for more information."
85+
Try '$me --help' for more information."
8686

8787
# Parse command line
8888
while test $# -gt 0 ; do
@@ -130,7 +130,7 @@ IFS=$saved_IFS
130130
# Separate into logical components for further validation
131131
case $1 in
132132
*-*-*-*-*)
133-
echo Invalid configuration \`"$1"\': more than four components >&2
133+
echo "Invalid configuration '$1': more than four components" >&2
134134
exit 1
135135
;;
136136
*-*-*-*)
@@ -145,7 +145,8 @@ case $1 in
145145
nto-qnx* | linux-* | uclinux-uclibc* \
146146
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
147147
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
148-
| storm-chaos* | os2-emx* | rtmk-nova*)
148+
| storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
149+
| windows-* )
149150
basic_machine=$field1
150151
basic_os=$maybe_os
151152
;;
@@ -943,7 +944,7 @@ $basic_machine
943944
EOF
944945
IFS=$saved_IFS
945946
;;
946-
# We use `pc' rather than `unknown'
947+
# We use 'pc' rather than 'unknown'
947948
# because (1) that's what they normally are, and
948949
# (2) the word "unknown" tends to confuse beginning users.
949950
i*86 | x86_64)
@@ -1020,6 +1021,11 @@ case $cpu-$vendor in
10201021
;;
10211022

10221023
# Here we normalize CPU types with a missing or matching vendor
1024+
armh-unknown | armh-alt)
1025+
cpu=armv7l
1026+
vendor=alt
1027+
basic_os=${basic_os:-linux-gnueabihf}
1028+
;;
10231029
dpx20-unknown | dpx20-bull)
10241030
cpu=rs6000
10251031
vendor=bull
@@ -1070,7 +1076,7 @@ case $cpu-$vendor in
10701076
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
10711077
cpu=i586
10721078
;;
1073-
pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1079+
pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
10741080
cpu=i686
10751081
;;
10761082
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
@@ -1121,7 +1127,7 @@ case $cpu-$vendor in
11211127
xscale-* | xscalee[bl]-*)
11221128
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
11231129
;;
1124-
arm64-*)
1130+
arm64-* | aarch64le-*)
11251131
cpu=aarch64
11261132
;;
11271133

@@ -1202,7 +1208,7 @@ case $cpu-$vendor in
12021208
| k1om \
12031209
| le32 | le64 \
12041210
| lm32 \
1205-
| loongarch32 | loongarch64 | loongarchx32 \
1211+
| loongarch32 | loongarch64 \
12061212
| m32c | m32r | m32rle \
12071213
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
12081214
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1280,7 +1286,7 @@ case $cpu-$vendor in
12801286
;;
12811287

12821288
*)
1283-
echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1289+
echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
12841290
exit 1
12851291
;;
12861292
esac
@@ -1304,7 +1310,7 @@ esac
13041310
if test x$basic_os != x
13051311
then
13061312

1307-
# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
1313+
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
13081314
# set os.
13091315
case $basic_os in
13101316
gnu/linux*)
@@ -1336,6 +1342,10 @@ EOF
13361342
kernel=linux
13371343
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
13381344
;;
1345+
managarm*)
1346+
kernel=managarm
1347+
os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
1348+
;;
13391349
*)
13401350
kernel=
13411351
os=$basic_os
@@ -1748,16 +1758,20 @@ case $os in
17481758
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
17491759
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
17501760
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1751-
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
1761+
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
1762+
| fiwix* | mlibc* )
17521763
;;
17531764
# This one is extra strict with allowed versions
17541765
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
17551766
# Don't forget version if it is 3.2v4 or newer.
17561767
;;
17571768
none)
17581769
;;
1770+
kernel* | msvc* )
1771+
# Restricted further below
1772+
;;
17591773
*)
1760-
echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
1774+
echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
17611775
exit 1
17621776
;;
17631777
esac
@@ -1766,14 +1780,30 @@ esac
17661780
# (given a valid OS), if there is a kernel.
17671781
case $kernel-$os in
17681782
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
1769-
| linux-musl* | linux-relibc* | linux-uclibc* )
1783+
| linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
17701784
;;
17711785
uclinux-uclibc* )
17721786
;;
1773-
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
1787+
managarm-mlibc* | managarm-kernel* )
1788+
;;
1789+
windows*-gnu* | windows*-msvc*)
1790+
;;
1791+
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
17741792
# These are just libc implementations, not actual OSes, and thus
17751793
# require a kernel.
1776-
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
1794+
echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
1795+
exit 1
1796+
;;
1797+
-kernel* )
1798+
echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
1799+
exit 1
1800+
;;
1801+
*-kernel* )
1802+
echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
1803+
exit 1
1804+
;;
1805+
*-msvc* )
1806+
echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
17771807
exit 1
17781808
;;
17791809
kfreebsd*-gnu* | kopensolaris*-gnu*)
@@ -1790,7 +1820,7 @@ case $kernel-$os in
17901820
# Blank kernel with real OS is always fine.
17911821
;;
17921822
*-*)
1793-
echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
1823+
echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
17941824
exit 1
17951825
;;
17961826
esac

0 commit comments

Comments
 (0)