aboutsummaryrefslogtreecommitdiffstats
path: root/exec/config.sub
diff options
context:
space:
mode:
Diffstat (limited to 'exec/config.sub')
-rwxr-xr-xexec/config.sub49
1 files changed, 33 insertions, 16 deletions
diff --git a/exec/config.sub b/exec/config.sub
index b41da55df45..a6d99a0f15f 100755
--- a/exec/config.sub
+++ b/exec/config.sub
@@ -1,10 +1,10 @@
1#!/usr/bin/sh 1#!/usr/bin/sh
2# Configuration validation subroutine script. 2# Configuration validation subroutine script.
3# Copyright 1992-2022 Free Software Foundation, Inc. 3# Copyright 1992-2023 Free Software Foundation, Inc.
4 4
5# shellcheck disable=SC2006,SC2268 # see below for rationale 5# shellcheck disable=SC2006,SC2268 # see below for rationale
6 6
7timestamp='2022-01-03' 7timestamp='2023-06-23'
8 8
9# This file is free software; you can redistribute it and/or modify it 9# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by 10# under the terms of the GNU General Public License as published by
@@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
76version="\ 76version="\
77GNU config.sub ($timestamp) 77GNU config.sub ($timestamp)
78 78
79Copyright 1992-2022 Free Software Foundation, Inc. 79Copyright 1992-2023 Free Software Foundation, Inc.
80 80
81This is free software; see the source for copying conditions. There is NO 81This is free software; see the source for copying conditions. There is NO
82warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 82warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
83 83
84help=" 84help="
85Try \`$me --help' for more information." 85Try '$me --help' for more information."
86 86
87# Parse command line 87# Parse command line
88while test $# -gt 0 ; do 88while test $# -gt 0 ; do
@@ -130,7 +130,7 @@ IFS=$saved_IFS
130# Separate into logical components for further validation 130# Separate into logical components for further validation
131case $1 in 131case $1 in
132 *-*-*-*-*) 132 *-*-*-*-*)
133 echo Invalid configuration \`"$1"\': more than four components >&2 133 echo "Invalid configuration '$1': more than four components" >&2
134 exit 1 134 exit 1
135 ;; 135 ;;
136 *-*-*-*) 136 *-*-*-*)
@@ -145,7 +145,7 @@ case $1 in
145 nto-qnx* | linux-* | uclinux-uclibc* \ 145 nto-qnx* | linux-* | uclinux-uclibc* \
146 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ 146 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
147 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ 147 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
148 | storm-chaos* | os2-emx* | rtmk-nova*) 148 | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*)
149 basic_machine=$field1 149 basic_machine=$field1
150 basic_os=$maybe_os 150 basic_os=$maybe_os
151 ;; 151 ;;
@@ -943,7 +943,7 @@ $basic_machine
943EOF 943EOF
944 IFS=$saved_IFS 944 IFS=$saved_IFS
945 ;; 945 ;;
946 # We use `pc' rather than `unknown' 946 # We use 'pc' rather than 'unknown'
947 # because (1) that's what they normally are, and 947 # because (1) that's what they normally are, and
948 # (2) the word "unknown" tends to confuse beginning users. 948 # (2) the word "unknown" tends to confuse beginning users.
949 i*86 | x86_64) 949 i*86 | x86_64)
@@ -1075,7 +1075,7 @@ case $cpu-$vendor in
1075 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1075 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1076 cpu=i586 1076 cpu=i586
1077 ;; 1077 ;;
1078 pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) 1078 pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
1079 cpu=i686 1079 cpu=i686
1080 ;; 1080 ;;
1081 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1081 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
@@ -1207,7 +1207,7 @@ case $cpu-$vendor in
1207 | k1om \ 1207 | k1om \
1208 | le32 | le64 \ 1208 | le32 | le64 \
1209 | lm32 \ 1209 | lm32 \
1210 | loongarch32 | loongarch64 | loongarchx32 \ 1210 | loongarch32 | loongarch64 \
1211 | m32c | m32r | m32rle \ 1211 | m32c | m32r | m32rle \
1212 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ 1212 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1213 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ 1213 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1285,7 +1285,7 @@ case $cpu-$vendor in
1285 ;; 1285 ;;
1286 1286
1287 *) 1287 *)
1288 echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 1288 echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
1289 exit 1 1289 exit 1
1290 ;; 1290 ;;
1291 esac 1291 esac
@@ -1341,6 +1341,10 @@ EOF
1341 kernel=linux 1341 kernel=linux
1342 os=`echo "$basic_os" | sed -e 's|linux|gnu|'` 1342 os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1343 ;; 1343 ;;
1344 managarm*)
1345 kernel=managarm
1346 os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
1347 ;;
1344 *) 1348 *)
1345 kernel= 1349 kernel=
1346 os=$basic_os 1350 os=$basic_os
@@ -1754,7 +1758,7 @@ case $os in
1754 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ 1758 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1755 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ 1759 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1756 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ 1760 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
1757 | fiwix* ) 1761 | fiwix* | mlibc* )
1758 ;; 1762 ;;
1759 # This one is extra strict with allowed versions 1763 # This one is extra strict with allowed versions
1760 sco3.2v2 | sco3.2v[4-9]* | sco5v6*) 1764 sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1762,8 +1766,11 @@ case $os in
1762 ;; 1766 ;;
1763 none) 1767 none)
1764 ;; 1768 ;;
1769 kernel* )
1770 # Restricted further below
1771 ;;
1765 *) 1772 *)
1766 echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 1773 echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
1767 exit 1 1774 exit 1
1768 ;; 1775 ;;
1769esac 1776esac
@@ -1772,14 +1779,24 @@ esac
1772# (given a valid OS), if there is a kernel. 1779# (given a valid OS), if there is a kernel.
1773case $kernel-$os in 1780case $kernel-$os in
1774 linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ 1781 linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
1775 | linux-musl* | linux-relibc* | linux-uclibc* ) 1782 | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
1776 ;; 1783 ;;
1777 uclinux-uclibc* ) 1784 uclinux-uclibc* )
1778 ;; 1785 ;;
1779 -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) 1786 managarm-mlibc* | managarm-kernel* )
1787 ;;
1788 -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
1780 # These are just libc implementations, not actual OSes, and thus 1789 # These are just libc implementations, not actual OSes, and thus
1781 # require a kernel. 1790 # require a kernel.
1782 echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 1791 echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
1792 exit 1
1793 ;;
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
1783 exit 1 1800 exit 1
1784 ;; 1801 ;;
1785 kfreebsd*-gnu* | kopensolaris*-gnu*) 1802 kfreebsd*-gnu* | kopensolaris*-gnu*)
@@ -1796,7 +1813,7 @@ case $kernel-$os in
1796 # Blank kernel with real OS is always fine. 1813 # Blank kernel with real OS is always fine.
1797 ;; 1814 ;;
1798 *-*) 1815 *-*)
1799 echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 1816 echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
1800 exit 1 1817 exit 1
1801 ;; 1818 ;;
1802esac 1819esac