updated config.sub from mainstream.

This commit is contained in:
Ozkan Sezer 2021-08-21 11:50:04 +03:00
parent e426bb80cb
commit 7e8d054b97
1 changed files with 16 additions and 5 deletions

View File

@ -4,7 +4,7 @@
# shellcheck disable=SC2006,SC2268 # see below for rationale # shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2021-07-03' timestamp='2021-08-14'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -121,9 +121,11 @@ esac
# Split fields of configuration type # Split fields of configuration type
# shellcheck disable=SC2162 # shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read field1 field2 field3 field4 <<EOF IFS="-" read field1 field2 field3 field4 <<EOF
$1 $1
EOF EOF
IFS=$saved_IFS
# Separate into logical components for further validation # Separate into logical components for further validation
case $1 in case $1 in
@ -172,6 +174,10 @@ case $1 in
basic_machine=$field1 basic_machine=$field1
basic_os=$field2 basic_os=$field2
;; ;;
zephyr*)
basic_machine=$field1-unknown
basic_os=$field2
;;
# Manufacturers # Manufacturers
dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
@ -931,9 +937,11 @@ case $basic_machine in
*-*) *-*)
# shellcheck disable=SC2162 # shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read cpu vendor <<EOF IFS="-" read cpu vendor <<EOF
$basic_machine $basic_machine
EOF EOF
IFS=$saved_IFS
;; ;;
# We use `pc' rather than `unknown' # We use `pc' rather than `unknown'
# because (1) that's what they normally are, and # because (1) that's what they normally are, and
@ -1313,9 +1321,11 @@ case $basic_os in
;; ;;
*-*) *-*)
# shellcheck disable=SC2162 # shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read kernel os <<EOF IFS="-" read kernel os <<EOF
$basic_os $basic_os
EOF EOF
IFS=$saved_IFS
;; ;;
# Default OS when just kernel was specified # Default OS when just kernel was specified
nto*) nto*)
@ -1697,7 +1707,7 @@ fi
# Now, validate our (potentially fixed-up) OS. # Now, validate our (potentially fixed-up) OS.
case $os in case $os in
# Sometimes we do "kernel-libc", so those need to count as OSes. # Sometimes we do "kernel-libc", so those need to count as OSes.
musl* | newlib* | uclibc*) musl* | newlib* | relibc* | uclibc*)
;; ;;
# Likewise for "kernel-abi" # Likewise for "kernel-abi"
eabi* | gnueabi*) eabi* | gnueabi*)
@ -1738,7 +1748,7 @@ case $os in
| skyos* | haiku* | rdos* | toppers* | drops* | es* \ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
;; ;;
# This one is extra strict with allowed versions # This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*) sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@ -1755,11 +1765,12 @@ esac
# As a final step for OS-related things, validate the OS-kernel combination # As a final step for OS-related things, validate the OS-kernel combination
# (given a valid OS), if there is a kernel. # (given a valid OS), if there is a kernel.
case $kernel-$os in case $kernel-$os in
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
| linux-musl* | linux-relibc* | linux-uclibc* )
;; ;;
uclinux-uclibc* ) uclinux-uclibc* )
;; ;;
-dietlibc* | -newlib* | -musl* | -uclibc* ) -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
# These are just libc implementations, not actual OSes, and thus # These are just libc implementations, not actual OSes, and thus
# require a kernel. # require a kernel.
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2