mirror of https://github.com/postgres/postgres
Update config.guess and config.sub
This commit is contained in:
parent
43a9cab484
commit
cfd6ea3ac0
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2023 Free Software Foundation, Inc.
|
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||||
|
|
||||||
timestamp='2023-01-01'
|
timestamp='2024-01-01'
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
|
||||||
usage="\
|
usage="\
|
||||||
Usage: $0 [OPTION]
|
Usage: $0 [OPTION]
|
||||||
|
|
||||||
Output the configuration name of the system \`$me' is run on.
|
Output the configuration name of the system '$me' is run on.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h, --help print this help, then exit
|
-h, --help print this help, then exit
|
||||||
|
@ -60,13 +60,13 @@ version="\
|
||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright 1992-2023 Free Software Foundation, Inc.
|
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
||||||
help="
|
help="
|
||||||
Try \`$me --help' for more information."
|
Try '$me --help' for more information."
|
||||||
|
|
||||||
# Parse command line
|
# Parse command line
|
||||||
while test $# -gt 0 ; do
|
while test $# -gt 0 ; do
|
||||||
|
@ -102,8 +102,8 @@ GUESS=
|
||||||
# temporary files to be created and, as you can see below, it is a
|
# temporary files to be created and, as you can see below, it is a
|
||||||
# headache to deal with in a portable fashion.
|
# headache to deal with in a portable fashion.
|
||||||
|
|
||||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
|
||||||
# use `HOST_CC' if defined, but it is deprecated.
|
# use 'HOST_CC' if defined, but it is deprecated.
|
||||||
|
|
||||||
# Portable tmp directory creation inspired by the Autoconf team.
|
# Portable tmp directory creation inspired by the Autoconf team.
|
||||||
|
|
||||||
|
@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
|
||||||
|
|
||||||
set_cc_for_build
|
set_cc_for_build
|
||||||
cat <<-EOF > "$dummy.c"
|
cat <<-EOF > "$dummy.c"
|
||||||
|
#if defined(__ANDROID__)
|
||||||
|
LIBC=android
|
||||||
|
#else
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#if defined(__UCLIBC__)
|
#if defined(__UCLIBC__)
|
||||||
LIBC=uclibc
|
LIBC=uclibc
|
||||||
|
@ -162,6 +165,8 @@ Linux|GNU|GNU/*)
|
||||||
LIBC=dietlibc
|
LIBC=dietlibc
|
||||||
#elif defined(__GLIBC__)
|
#elif defined(__GLIBC__)
|
||||||
LIBC=gnu
|
LIBC=gnu
|
||||||
|
#elif defined(__LLVM_LIBC__)
|
||||||
|
LIBC=llvm
|
||||||
#else
|
#else
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
/* First heuristic to detect musl libc. */
|
/* First heuristic to detect musl libc. */
|
||||||
|
@ -169,6 +174,7 @@ Linux|GNU|GNU/*)
|
||||||
LIBC=musl
|
LIBC=musl
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
EOF
|
EOF
|
||||||
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||||
eval "$cc_set_libc"
|
eval "$cc_set_libc"
|
||||||
|
@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
||||||
UNAME_RELEASE=`uname -v`
|
UNAME_RELEASE=`uname -v`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
# Japanese Language versions have a version number like '4.1.3-JL'.
|
||||||
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
||||||
GUESS=sparc-sun-sunos$SUN_REL
|
GUESS=sparc-sun-sunos$SUN_REL
|
||||||
;;
|
;;
|
||||||
|
@ -904,7 +910,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*:FreeBSD:*:*)
|
*:FreeBSD:*:*)
|
||||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
UNAME_PROCESSOR=`uname -p`
|
||||||
case $UNAME_PROCESSOR in
|
case $UNAME_PROCESSOR in
|
||||||
amd64)
|
amd64)
|
||||||
UNAME_PROCESSOR=x86_64 ;;
|
UNAME_PROCESSOR=x86_64 ;;
|
||||||
|
@ -976,7 +982,27 @@ EOF
|
||||||
GUESS=$UNAME_MACHINE-unknown-minix
|
GUESS=$UNAME_MACHINE-unknown-minix
|
||||||
;;
|
;;
|
||||||
aarch64:Linux:*:*)
|
aarch64:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
set_cc_for_build
|
||||||
|
CPU=$UNAME_MACHINE
|
||||||
|
LIBCABI=$LIBC
|
||||||
|
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||||
|
ABI=64
|
||||||
|
sed 's/^ //' << EOF > "$dummy.c"
|
||||||
|
#ifdef __ARM_EABI__
|
||||||
|
#ifdef __ARM_PCS_VFP
|
||||||
|
ABI=eabihf
|
||||||
|
#else
|
||||||
|
ABI=eabi
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
||||||
|
eval "$cc_set_abi"
|
||||||
|
case $ABI in
|
||||||
|
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
GUESS=$CPU-unknown-linux-$LIBCABI
|
||||||
;;
|
;;
|
||||||
aarch64_be:Linux:*:*)
|
aarch64_be:Linux:*:*)
|
||||||
UNAME_MACHINE=aarch64_be
|
UNAME_MACHINE=aarch64_be
|
||||||
|
@ -1042,6 +1068,15 @@ EOF
|
||||||
k1om:Linux:*:*)
|
k1om:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
|
kvx:Linux:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
|
;;
|
||||||
|
kvx:cos:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-cos
|
||||||
|
;;
|
||||||
|
kvx:mbr:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-mbr
|
||||||
|
;;
|
||||||
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
|
@ -1197,7 +1232,7 @@ EOF
|
||||||
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
||||||
;;
|
;;
|
||||||
i*86:OS/2:*:*)
|
i*86:OS/2:*:*)
|
||||||
# If we were able to find `uname', then EMX Unix compatibility
|
# If we were able to find 'uname', then EMX Unix compatibility
|
||||||
# is probably installed.
|
# is probably installed.
|
||||||
GUESS=$UNAME_MACHINE-pc-os2-emx
|
GUESS=$UNAME_MACHINE-pc-os2-emx
|
||||||
;;
|
;;
|
||||||
|
@ -1338,7 +1373,7 @@ EOF
|
||||||
GUESS=ns32k-sni-sysv
|
GUESS=ns32k-sni-sysv
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
|
||||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||||
GUESS=i586-unisys-sysv4
|
GUESS=i586-unisys-sysv4
|
||||||
;;
|
;;
|
||||||
|
@ -1560,6 +1595,9 @@ EOF
|
||||||
*:Unleashed:*:*)
|
*:Unleashed:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||||
;;
|
;;
|
||||||
|
*:Ironclad:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-ironclad
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Do we have a guess based on uname results?
|
# Do we have a guess based on uname results?
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2023 Free Software Foundation, Inc.
|
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||||
|
|
||||||
timestamp='2023-01-21'
|
timestamp='2024-01-01'
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright 1992-2023 Free Software Foundation, Inc.
|
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
||||||
help="
|
help="
|
||||||
Try \`$me --help' for more information."
|
Try '$me --help' for more information."
|
||||||
|
|
||||||
# Parse command line
|
# Parse command line
|
||||||
while test $# -gt 0 ; do
|
while test $# -gt 0 ; do
|
||||||
|
@ -130,7 +130,7 @@ IFS=$saved_IFS
|
||||||
# Separate into logical components for further validation
|
# Separate into logical components for further validation
|
||||||
case $1 in
|
case $1 in
|
||||||
*-*-*-*-*)
|
*-*-*-*-*)
|
||||||
echo Invalid configuration \`"$1"\': more than four components >&2
|
echo "Invalid configuration '$1': more than four components" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*-*-*-*)
|
*-*-*-*)
|
||||||
|
@ -145,7 +145,8 @@ case $1 in
|
||||||
nto-qnx* | linux-* | uclinux-uclibc* \
|
nto-qnx* | linux-* | uclinux-uclibc* \
|
||||||
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
||||||
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
||||||
| storm-chaos* | os2-emx* | rtmk-nova* | managarm-*)
|
| storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
|
||||||
|
| windows-* )
|
||||||
basic_machine=$field1
|
basic_machine=$field1
|
||||||
basic_os=$maybe_os
|
basic_os=$maybe_os
|
||||||
;;
|
;;
|
||||||
|
@ -943,7 +944,7 @@ $basic_machine
|
||||||
EOF
|
EOF
|
||||||
IFS=$saved_IFS
|
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
|
||||||
# (2) the word "unknown" tends to confuse beginning users.
|
# (2) the word "unknown" tends to confuse beginning users.
|
||||||
i*86 | x86_64)
|
i*86 | x86_64)
|
||||||
|
@ -1180,7 +1181,7 @@ case $cpu-$vendor in
|
||||||
case $cpu in
|
case $cpu in
|
||||||
1750a | 580 \
|
1750a | 580 \
|
||||||
| a29k \
|
| a29k \
|
||||||
| aarch64 | aarch64_be \
|
| aarch64 | aarch64_be | aarch64c | arm64ec \
|
||||||
| abacus \
|
| abacus \
|
||||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
||||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
||||||
|
@ -1199,12 +1200,14 @@ case $cpu-$vendor in
|
||||||
| d10v | d30v | dlx | dsp16xx \
|
| d10v | d30v | dlx | dsp16xx \
|
||||||
| e2k | elxsi | epiphany \
|
| e2k | elxsi | epiphany \
|
||||||
| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
|
| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
|
||||||
|
| javascript \
|
||||||
| h8300 | h8500 \
|
| h8300 | h8500 \
|
||||||
| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||||
| hexagon \
|
| hexagon \
|
||||||
| i370 | i*86 | i860 | i960 | ia16 | ia64 \
|
| i370 | i*86 | i860 | i960 | ia16 | ia64 \
|
||||||
| ip2k | iq2000 \
|
| ip2k | iq2000 \
|
||||||
| k1om \
|
| k1om \
|
||||||
|
| kvx \
|
||||||
| le32 | le64 \
|
| le32 | le64 \
|
||||||
| lm32 \
|
| lm32 \
|
||||||
| loongarch32 | loongarch64 \
|
| loongarch32 | loongarch64 \
|
||||||
|
@ -1213,36 +1216,13 @@ case $cpu-$vendor in
|
||||||
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
||||||
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
||||||
| microblaze | microblazeel \
|
| microblaze | microblazeel \
|
||||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
| mips* \
|
||||||
| mips16 \
|
|
||||||
| mips64 | mips64eb | mips64el \
|
|
||||||
| mips64octeon | mips64octeonel \
|
|
||||||
| mips64orion | mips64orionel \
|
|
||||||
| mips64r5900 | mips64r5900el \
|
|
||||||
| mips64vr | mips64vrel \
|
|
||||||
| mips64vr4100 | mips64vr4100el \
|
|
||||||
| mips64vr4300 | mips64vr4300el \
|
|
||||||
| mips64vr5000 | mips64vr5000el \
|
|
||||||
| mips64vr5900 | mips64vr5900el \
|
|
||||||
| mipsisa32 | mipsisa32el \
|
|
||||||
| mipsisa32r2 | mipsisa32r2el \
|
|
||||||
| mipsisa32r3 | mipsisa32r3el \
|
|
||||||
| mipsisa32r5 | mipsisa32r5el \
|
|
||||||
| mipsisa32r6 | mipsisa32r6el \
|
|
||||||
| mipsisa64 | mipsisa64el \
|
|
||||||
| mipsisa64r2 | mipsisa64r2el \
|
|
||||||
| mipsisa64r3 | mipsisa64r3el \
|
|
||||||
| mipsisa64r5 | mipsisa64r5el \
|
|
||||||
| mipsisa64r6 | mipsisa64r6el \
|
|
||||||
| mipsisa64sb1 | mipsisa64sb1el \
|
|
||||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
|
||||||
| mipsr5900 | mipsr5900el \
|
|
||||||
| mipstx39 | mipstx39el \
|
|
||||||
| mmix \
|
| mmix \
|
||||||
| mn10200 | mn10300 \
|
| mn10200 | mn10300 \
|
||||||
| moxie \
|
| moxie \
|
||||||
| mt \
|
| mt \
|
||||||
| msp430 \
|
| msp430 \
|
||||||
|
| nanomips* \
|
||||||
| nds32 | nds32le | nds32be \
|
| nds32 | nds32le | nds32be \
|
||||||
| nfp \
|
| nfp \
|
||||||
| nios | nios2 | nios2eb | nios2el \
|
| nios | nios2 | nios2eb | nios2el \
|
||||||
|
@ -1274,6 +1254,7 @@ case $cpu-$vendor in
|
||||||
| ubicom32 \
|
| ubicom32 \
|
||||||
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
|
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
|
||||||
| vax \
|
| vax \
|
||||||
|
| vc4 \
|
||||||
| visium \
|
| visium \
|
||||||
| w65 \
|
| w65 \
|
||||||
| wasm32 | wasm64 \
|
| wasm32 | wasm64 \
|
||||||
|
@ -1285,7 +1266,7 @@ case $cpu-$vendor in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
|
echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -1306,11 +1287,12 @@ esac
|
||||||
|
|
||||||
# Decode manufacturer-specific aliases for certain operating systems.
|
# Decode manufacturer-specific aliases for certain operating systems.
|
||||||
|
|
||||||
if test x$basic_os != x
|
if test x"$basic_os" != x
|
||||||
then
|
then
|
||||||
|
|
||||||
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
|
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
|
||||||
# set os.
|
# set os.
|
||||||
|
obj=
|
||||||
case $basic_os in
|
case $basic_os in
|
||||||
gnu/linux*)
|
gnu/linux*)
|
||||||
kernel=linux
|
kernel=linux
|
||||||
|
@ -1510,10 +1492,16 @@ case $os in
|
||||||
os=eabi
|
os=eabi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
aout* | coff* | elf* | pe*)
|
||||||
|
# These are machine code file formats, not OSes
|
||||||
|
obj=$os
|
||||||
|
os=
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# No normalization, but not necessarily accepted, that comes below.
|
# No normalization, but not necessarily accepted, that comes below.
|
||||||
;;
|
;;
|
||||||
|
@ -1532,12 +1520,15 @@ else
|
||||||
# system, and we'll never get to this point.
|
# system, and we'll never get to this point.
|
||||||
|
|
||||||
kernel=
|
kernel=
|
||||||
|
obj=
|
||||||
case $cpu-$vendor in
|
case $cpu-$vendor in
|
||||||
score-*)
|
score-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
spu-*)
|
spu-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
*-acorn)
|
*-acorn)
|
||||||
os=riscix1.2
|
os=riscix1.2
|
||||||
|
@ -1547,28 +1538,35 @@ case $cpu-$vendor in
|
||||||
os=gnu
|
os=gnu
|
||||||
;;
|
;;
|
||||||
arm*-semi)
|
arm*-semi)
|
||||||
os=aout
|
os=
|
||||||
|
obj=aout
|
||||||
;;
|
;;
|
||||||
c4x-* | tic4x-*)
|
c4x-* | tic4x-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
c8051-*)
|
c8051-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
clipper-intergraph)
|
clipper-intergraph)
|
||||||
os=clix
|
os=clix
|
||||||
;;
|
;;
|
||||||
hexagon-*)
|
hexagon-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
tic54x-*)
|
tic54x-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
tic55x-*)
|
tic55x-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
tic6x-*)
|
tic6x-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
# This must come before the *-dec entry.
|
# This must come before the *-dec entry.
|
||||||
pdp10-*)
|
pdp10-*)
|
||||||
|
@ -1590,19 +1588,24 @@ case $cpu-$vendor in
|
||||||
os=sunos3
|
os=sunos3
|
||||||
;;
|
;;
|
||||||
m68*-cisco)
|
m68*-cisco)
|
||||||
os=aout
|
os=
|
||||||
|
obj=aout
|
||||||
;;
|
;;
|
||||||
mep-*)
|
mep-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
mips*-cisco)
|
mips*-cisco)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
mips*-*)
|
mips*-*|nanomips*-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
or32-*)
|
or32-*)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
*-tti) # must be before sparc entry or we get the wrong os.
|
*-tti) # must be before sparc entry or we get the wrong os.
|
||||||
os=sysv3
|
os=sysv3
|
||||||
|
@ -1611,7 +1614,8 @@ case $cpu-$vendor in
|
||||||
os=sunos4.1.1
|
os=sunos4.1.1
|
||||||
;;
|
;;
|
||||||
pru-*)
|
pru-*)
|
||||||
os=elf
|
os=
|
||||||
|
obj=elf
|
||||||
;;
|
;;
|
||||||
*-be)
|
*-be)
|
||||||
os=beos
|
os=beos
|
||||||
|
@ -1692,10 +1696,12 @@ case $cpu-$vendor in
|
||||||
os=uxpv
|
os=uxpv
|
||||||
;;
|
;;
|
||||||
*-rom68k)
|
*-rom68k)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
*-*bug)
|
*-*bug)
|
||||||
os=coff
|
os=
|
||||||
|
obj=coff
|
||||||
;;
|
;;
|
||||||
*-apple)
|
*-apple)
|
||||||
os=macos
|
os=macos
|
||||||
|
@ -1713,17 +1719,21 @@ esac
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Now, validate our (potentially fixed-up) OS.
|
# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
|
||||||
|
|
||||||
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* | relibc* | uclibc*)
|
llvm* | musl* | newlib* | relibc* | uclibc*)
|
||||||
;;
|
;;
|
||||||
# Likewise for "kernel-abi"
|
# Likewise for "kernel-abi"
|
||||||
eabi* | gnueabi*)
|
eabi* | gnueabi*)
|
||||||
;;
|
;;
|
||||||
# VxWorks passes extra cpu info in the 4th field.
|
# VxWorks passes extra cpu info in the 4th filed.
|
||||||
simlinux | simwindows | spe)
|
simlinux | simwindows | spe)
|
||||||
;;
|
;;
|
||||||
|
# See `case $cpu-$os` validation below
|
||||||
|
ghcjs)
|
||||||
|
;;
|
||||||
# Now accept the basic system types.
|
# Now accept the basic system types.
|
||||||
# The portable systems comes first.
|
# The portable systems comes first.
|
||||||
# Each alternative MUST end in a * to match a version number.
|
# Each alternative MUST end in a * to match a version number.
|
||||||
|
@ -1732,7 +1742,7 @@ case $os in
|
||||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||||
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
||||||
| hiux* | abug | nacl* | netware* | windows* \
|
| hiux* | abug | nacl* | netware* | windows* \
|
||||||
| os9* | macos* | osx* | ios* \
|
| os9* | macos* | osx* | ios* | tvos* | watchos* \
|
||||||
| mpw* | magic* | mmixware* | mon960* | lnews* \
|
| mpw* | magic* | mmixware* | mon960* | lnews* \
|
||||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||||
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
||||||
|
@ -1741,11 +1751,11 @@ case $os in
|
||||||
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
|
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
|
||||||
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
|
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
|
||||||
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
|
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
|
||||||
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
| bosx* | nextstep* | cxux* | oabi* \
|
||||||
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
| ptx* | ecoff* | winnt* | domain* | vsta* \
|
||||||
| udi* | lites* | ieee* | go32* | aux* | hcos* \
|
| udi* | lites* | ieee* | go32* | aux* | hcos* \
|
||||||
| chorusrdb* | cegcc* | glidix* | serenity* \
|
| chorusrdb* | cegcc* | glidix* | serenity* \
|
||||||
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
|
| cygwin* | msys* | moss* | proelf* | rtems* \
|
||||||
| midipix* | mingw32* | mingw64* | mint* \
|
| midipix* | mingw32* | mingw64* | mint* \
|
||||||
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
||||||
| interix* | uwin* | mks* | rhapsody* | darwin* \
|
| interix* | uwin* | mks* | rhapsody* | darwin* \
|
||||||
|
@ -1758,62 +1768,116 @@ case $os in
|
||||||
| 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* | zephyr* \
|
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||||
| fiwix* | mlibc* )
|
| fiwix* | mlibc* | cos* | mbr* | ironclad* )
|
||||||
;;
|
;;
|
||||||
# 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*)
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
# Don't forget version if it is 3.2v4 or newer.
|
||||||
;;
|
;;
|
||||||
|
# This refers to builds using the UEFI calling convention
|
||||||
|
# (which depends on the architecture) and PE file format.
|
||||||
|
# Note that this is both a different calling convention and
|
||||||
|
# different file format than that of GNU-EFI
|
||||||
|
# (x86_64-w64-mingw32).
|
||||||
|
uefi)
|
||||||
|
;;
|
||||||
none)
|
none)
|
||||||
;;
|
;;
|
||||||
kernel* )
|
kernel* | msvc* )
|
||||||
# Restricted further below
|
# Restricted further below
|
||||||
;;
|
;;
|
||||||
|
'')
|
||||||
|
if test x"$obj" = x
|
||||||
|
then
|
||||||
|
echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
|
echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $obj in
|
||||||
|
aout* | coff* | elf* | pe*)
|
||||||
|
;;
|
||||||
|
'')
|
||||||
|
# empty is fine
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Here we handle the constraint that a (synthetic) cpu and os are
|
||||||
|
# valid only in combination with each other and nowhere else.
|
||||||
|
case $cpu-$os in
|
||||||
|
# The "javascript-unknown-ghcjs" triple is used by GHC; we
|
||||||
|
# accept it here in order to tolerate that, but reject any
|
||||||
|
# variations.
|
||||||
|
javascript-ghcjs)
|
||||||
|
;;
|
||||||
|
javascript-* | *-ghcjs)
|
||||||
|
echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
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-$obj in
|
||||||
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
|
||||||
| linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
|
| linux-mlibc*- | linux-musl*- | linux-newlib*- \
|
||||||
|
| linux-relibc*- | linux-uclibc*- )
|
||||||
;;
|
;;
|
||||||
uclinux-uclibc* )
|
uclinux-uclibc*- )
|
||||||
;;
|
;;
|
||||||
managarm-mlibc* | managarm-kernel* )
|
managarm-mlibc*- | managarm-kernel*- )
|
||||||
;;
|
;;
|
||||||
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
|
windows*-msvc*-)
|
||||||
|
;;
|
||||||
|
-dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -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
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
-kernel* )
|
-kernel*- )
|
||||||
echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2
|
echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*-kernel* )
|
*-kernel*- )
|
||||||
echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2
|
echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
kfreebsd*-gnu* | kopensolaris*-gnu*)
|
*-msvc*- )
|
||||||
|
echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
vxworks-simlinux | vxworks-simwindows | vxworks-spe)
|
kfreebsd*-gnu*- | kopensolaris*-gnu*-)
|
||||||
;;
|
;;
|
||||||
nto-qnx*)
|
vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
|
||||||
;;
|
;;
|
||||||
os2-emx)
|
nto-qnx*-)
|
||||||
;;
|
;;
|
||||||
*-eabi* | *-gnueabi*)
|
os2-emx-)
|
||||||
;;
|
;;
|
||||||
-*)
|
*-eabi*- | *-gnueabi*-)
|
||||||
|
;;
|
||||||
|
none--*)
|
||||||
|
# None (no kernel, i.e. freestanding / bare metal),
|
||||||
|
# can be paired with an machine code file format
|
||||||
|
;;
|
||||||
|
-*-)
|
||||||
# Blank kernel with real OS is always fine.
|
# Blank kernel with real OS is always fine.
|
||||||
;;
|
;;
|
||||||
*-*)
|
--*)
|
||||||
echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
|
# Blank kernel and OS with real machine code file format is always fine.
|
||||||
|
;;
|
||||||
|
*-*-*)
|
||||||
|
echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -1896,7 +1960,7 @@ case $vendor in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$cpu-$vendor-${kernel:+$kernel-}$os"
|
echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
|
||||||
exit
|
exit
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
|
|
Loading…
Reference in New Issue