Skip to content

Commit 906116a

Browse files
committed
Update config.guess and config.sub
1 parent 644b848 commit 906116a

File tree

2 files changed

+59
-22
lines changed

2 files changed

+59
-22
lines changed

config/config.guess

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#! /bin/sh
22
# Attempt to guess a canonical system name.
3-
# Copyright 1992-2022 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='2022-01-09'
7+
timestamp='2023-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
@@ -60,7 +60,7 @@ version="\
6060
GNU config.guess ($timestamp)
6161
6262
Originally written by Per Bothner.
63-
Copyright 1992-2022 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."
@@ -966,6 +966,12 @@ EOF
966966
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
967967
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
968968
;;
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+
;;
969975
*:Minix:*:*)
970976
GUESS=$UNAME_MACHINE-unknown-minix
971977
;;
@@ -1036,7 +1042,7 @@ EOF
10361042
k1om:Linux:*:*)
10371043
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10381044
;;
1039-
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1045+
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
10401046
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10411047
;;
10421048
m32r*:Linux:*:*)
@@ -1151,16 +1157,27 @@ EOF
11511157
;;
11521158
x86_64:Linux:*:*)
11531159
set_cc_for_build
1160+
CPU=$UNAME_MACHINE
11541161
LIBCABI=$LIBC
11551162
if test "$CC_FOR_BUILD" != no_compiler_found; then
1156-
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1157-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1158-
grep IS_X32 >/dev/null
1159-
then
1160-
LIBCABI=${LIBC}x32
1161-
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
11621179
fi
1163-
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1180+
GUESS=$CPU-pc-linux-$LIBCABI
11641181
;;
11651182
xtensa*:Linux:*:*)
11661183
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
@@ -1367,8 +1384,11 @@ EOF
13671384
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
13681385
GUESS=i586-pc-haiku
13691386
;;
1370-
x86_64:Haiku:*:*)
1371-
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
13721392
;;
13731393
SX-4:SUPER-UX:*:*)
13741394
GUESS=sx4-nec-superux$UNAME_RELEASE

config/config.sub

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#! /bin/sh
22
# Configuration validation subroutine script.
3-
# Copyright 1992-2022 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='2022-01-03'
7+
timestamp='2023-01-21'
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
@@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
7676
version="\
7777
GNU config.sub ($timestamp)
7878
79-
Copyright 1992-2022 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."
@@ -145,7 +145,7 @@ 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-*)
149149
basic_machine=$field1
150150
basic_os=$maybe_os
151151
;;
@@ -1075,7 +1075,7 @@ case $cpu-$vendor in
10751075
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
10761076
cpu=i586
10771077
;;
1078-
pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1078+
pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
10791079
cpu=i686
10801080
;;
10811081
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
@@ -1207,7 +1207,7 @@ case $cpu-$vendor in
12071207
| k1om \
12081208
| le32 | le64 \
12091209
| lm32 \
1210-
| loongarch32 | loongarch64 | loongarchx32 \
1210+
| loongarch32 | loongarch64 \
12111211
| m32c | m32r | m32rle \
12121212
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
12131213
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1341,6 +1341,10 @@ EOF
13411341
kernel=linux
13421342
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
13431343
;;
1344+
managarm*)
1345+
kernel=managarm
1346+
os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
1347+
;;
13441348
*)
13451349
kernel=
13461350
os=$basic_os
@@ -1754,14 +1758,17 @@ case $os in
17541758
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
17551759
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
17561760
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
1757-
| fiwix* )
1761+
| fiwix* | mlibc* )
17581762
;;
17591763
# This one is extra strict with allowed versions
17601764
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
17611765
# Don't forget version if it is 3.2v4 or newer.
17621766
;;
17631767
none)
17641768
;;
1769+
kernel* )
1770+
# Restricted further below
1771+
;;
17651772
*)
17661773
echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
17671774
exit 1
@@ -1772,16 +1779,26 @@ esac
17721779
# (given a valid OS), if there is a kernel.
17731780
case $kernel-$os in
17741781
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
1775-
| linux-musl* | linux-relibc* | linux-uclibc* )
1782+
| linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
17761783
;;
17771784
uclinux-uclibc* )
17781785
;;
1779-
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
1786+
managarm-mlibc* | managarm-kernel* )
1787+
;;
1788+
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
17801789
# These are just libc implementations, not actual OSes, and thus
17811790
# require a kernel.
17821791
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
17831792
exit 1
17841793
;;
1794+
-kernel* )
1795+
echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2
1796+
exit 1
1797+
;;
1798+
*-kernel* )
1799+
echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2
1800+
exit 1
1801+
;;
17851802
kfreebsd*-gnu* | kopensolaris*-gnu*)
17861803
;;
17871804
vxworks-simlinux | vxworks-simwindows | vxworks-spe)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy