Skip to content

Commit 66c85c3

Browse files
committed
Update bundled config.guess and config.sub
1 parent 8a40689 commit 66c85c3

File tree

2 files changed

+58
-54
lines changed

2 files changed

+58
-54
lines changed

build/config.guess

+44-35
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#! /bin/sh
22
# Attempt to guess a canonical system name.
3-
# Copyright 1992-2019 Free Software Foundation, Inc.
3+
# Copyright 1992-2020 Free Software Foundation, Inc.
44

5-
timestamp='2019-04-28'
5+
timestamp='2020-01-01'
66

77
# This file is free software; you can redistribute it and/or modify it
88
# under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
5050
GNU config.guess ($timestamp)
5151
5252
Originally written by Per Bothner.
53-
Copyright 1992-2019 Free Software Foundation, Inc.
53+
Copyright 1992-2020 Free Software Foundation, Inc.
5454
5555
This is free software; see the source for copying conditions. There is NO
5656
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -99,6 +99,8 @@ tmp=
9999
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
100100

101101
set_cc_for_build() {
102+
# prevent multiple calls if $tmp is already set
103+
test "$tmp" && return 0
102104
: "${TMPDIR=/tmp}"
103105
# shellcheck disable=SC2039
104106
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
@@ -262,6 +264,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
262264
*:SolidBSD:*:*)
263265
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
264266
exit ;;
267+
*:OS108:*:*)
268+
echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
269+
exit ;;
265270
macppc:MirBSD:*:*)
266271
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
267272
exit ;;
@@ -271,12 +276,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
271276
*:Sortix:*:*)
272277
echo "$UNAME_MACHINE"-unknown-sortix
273278
exit ;;
279+
*:Twizzler:*:*)
280+
echo "$UNAME_MACHINE"-unknown-twizzler
281+
exit ;;
274282
*:Redox:*:*)
275283
echo "$UNAME_MACHINE"-unknown-redox
276284
exit ;;
277285
mips:OSF1:*.*)
278-
echo mips-dec-osf1
279-
exit ;;
286+
echo mips-dec-osf1
287+
exit ;;
280288
alpha:OSF1:*:*)
281289
case $UNAME_RELEASE in
282290
*4.0)
@@ -918,7 +926,7 @@ EOF
918926
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
919927
exit ;;
920928
alpha:Linux:*:*)
921-
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
929+
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
922930
EV5) UNAME_MACHINE=alphaev5 ;;
923931
EV56) UNAME_MACHINE=alphaev56 ;;
924932
PCA56) UNAME_MACHINE=alphapca56 ;;
@@ -1325,38 +1333,39 @@ EOF
13251333
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
13261334
exit ;;
13271335
*:Darwin:*:*)
1328-
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1329-
set_cc_for_build
1330-
if test "$UNAME_PROCESSOR" = unknown ; then
1331-
UNAME_PROCESSOR=powerpc
1336+
UNAME_PROCESSOR=`uname -p`
1337+
case $UNAME_PROCESSOR in
1338+
unknown) UNAME_PROCESSOR=powerpc ;;
1339+
esac
1340+
if command -v xcode-select > /dev/null 2> /dev/null && \
1341+
! xcode-select --print-path > /dev/null 2> /dev/null ; then
1342+
# Avoid executing cc if there is no toolchain installed as
1343+
# cc will be a stub that puts up a graphical alert
1344+
# prompting the user to install developer tools.
1345+
CC_FOR_BUILD=no_compiler_found
1346+
else
1347+
set_cc_for_build
13321348
fi
1333-
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1334-
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1335-
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1336-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1337-
grep IS_64BIT_ARCH >/dev/null
1338-
then
1339-
case $UNAME_PROCESSOR in
1340-
i386) UNAME_PROCESSOR=x86_64 ;;
1341-
powerpc) UNAME_PROCESSOR=powerpc64 ;;
1342-
esac
1343-
fi
1344-
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1345-
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1346-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1347-
grep IS_PPC >/dev/null
1348-
then
1349-
UNAME_PROCESSOR=powerpc
1350-
fi
1349+
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1350+
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1351+
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1352+
grep IS_64BIT_ARCH >/dev/null
1353+
then
1354+
case $UNAME_PROCESSOR in
1355+
i386) UNAME_PROCESSOR=x86_64 ;;
1356+
powerpc) UNAME_PROCESSOR=powerpc64 ;;
1357+
esac
1358+
fi
1359+
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1360+
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1361+
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1362+
grep IS_PPC >/dev/null
1363+
then
1364+
UNAME_PROCESSOR=powerpc
13511365
fi
13521366
elif test "$UNAME_PROCESSOR" = i386 ; then
1353-
# Avoid executing cc on OS X 10.9, as it ships with a stub
1354-
# that puts up a graphical alert prompting to install
1355-
# developer tools. Any system running Mac OS X 10.7 or
1356-
# later (Darwin 11 and later) is required to have a 64-bit
1357-
# processor. This is not true of the ARM version of Darwin
1358-
# that Apple uses in portable devices.
1359-
UNAME_PROCESSOR=x86_64
1367+
# uname -m returns i386 or x86_64
1368+
UNAME_PROCESSOR=$UNAME_MACHINE
13601369
fi
13611370
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
13621371
exit ;;

build/config.sub

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

5-
timestamp='2019-01-05'
5+
timestamp='2020-01-01'
66

77
# This file is free software; you can redistribute it and/or modify it
88
# under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ Report bugs and patches to <[email protected]>."
6767
version="\
6868
GNU config.sub ($timestamp)
6969
70-
Copyright 1992-2019 Free Software Foundation, Inc.
70+
Copyright 1992-2020 Free Software Foundation, Inc.
7171
7272
This is free software; see the source for copying conditions. There is NO
7373
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -337,17 +337,14 @@ case $1 in
337337
basic_machine=m88k-harris
338338
os=sysv3
339339
;;
340-
hp300)
340+
hp300 | hp300hpux)
341341
basic_machine=m68k-hp
342+
os=hpux
342343
;;
343344
hp300bsd)
344345
basic_machine=m68k-hp
345346
os=bsd
346347
;;
347-
hp300hpux)
348-
basic_machine=m68k-hp
349-
os=hpux
350-
;;
351348
hppaosf)
352349
basic_machine=hppa1.1-hp
353350
os=osf
@@ -360,10 +357,6 @@ case $1 in
360357
basic_machine=i386-mach
361358
os=mach
362359
;;
363-
vsta)
364-
basic_machine=i386-pc
365-
os=vsta
366-
;;
367360
isi68 | isi)
368361
basic_machine=m68k-isi
369362
os=sysv
@@ -612,6 +605,10 @@ case $1 in
612605
basic_machine=vax-dec
613606
os=vms
614607
;;
608+
vsta)
609+
basic_machine=i386-pc
610+
os=vsta
611+
;;
615612
vxworks960)
616613
basic_machine=i960-wrs
617614
os=vxworks
@@ -1172,7 +1169,7 @@ case $cpu-$vendor in
11721169
| asmjs \
11731170
| ba \
11741171
| be32 | be64 \
1175-
| bfin | bs2000 \
1172+
| bfin | bpf | bs2000 \
11761173
| c[123]* | c30 | [cjt]90 | c4x \
11771174
| c8051 | clipper | craynv | csky | cydra \
11781175
| d10v | d30v | dlx | dsp16xx \
@@ -1346,11 +1343,11 @@ case $os in
13461343
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
13471344
| sym* | kopensolaris* | plan9* \
13481345
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1349-
| aos* | aros* | cloudabi* | sortix* \
1346+
| aos* | aros* | cloudabi* | sortix* | twizzler* \
13501347
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
13511348
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
13521349
| knetbsd* | mirbsd* | netbsd* \
1353-
| bitrig* | openbsd* | solidbsd* | libertybsd* \
1350+
| bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
13541351
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
13551352
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
13561353
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
@@ -1368,7 +1365,8 @@ case $os in
13681365
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
13691366
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
13701367
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1371-
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*)
1368+
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1369+
| nsk* | powerunix)
13721370
# Remember, each alternative MUST END IN *, to match a version number.
13731371
;;
13741372
qnx*)
@@ -1452,9 +1450,6 @@ case $os in
14521450
ns2)
14531451
os=nextstep2
14541452
;;
1455-
nsk*)
1456-
os=nsk
1457-
;;
14581453
# Preserve the version number of sinix5.
14591454
sinix5.*)
14601455
os=`echo $os | sed -e 's|sinix|sysv|'`

0 commit comments

Comments
 (0)