Skip to content

Commit d63f2be

Browse files
committedJan 14, 2019
Sync config.guess, config.sub from GCC
Merge from GCC: PR target/88535 * config.guess: Import upstream version 2019-01-03. * config.sub: Import upstream version 2019-01-01.
1 parent 55e8aae commit d63f2be

File tree

3 files changed

+633
-611
lines changed

3 files changed

+633
-611
lines changed
 

‎ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2019-01-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2+
3+
Merge from GCC:
4+
PR target/88535
5+
* config.guess: Import upstream version 2019-01-03.
6+
* config.sub: Import upstream version 2019-01-01.
7+
18
2019-01-10 Nick Clifton <nickc@redhat.com>
29

310
* libiberty: Sync with gcc. Bring in:

‎config.guess

+73-43
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-2018 Free Software Foundation, Inc.
3+
# Copyright 1992-2019 Free Software Foundation, Inc.
44

5-
timestamp='2018-06-26'
5+
timestamp='2019-01-03'
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-2018 Free Software Foundation, Inc.
53+
Copyright 1992-2019 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."
@@ -84,8 +84,6 @@ if test $# != 0; then
8484
exit 1
8585
fi
8686

87-
trap 'exit 1' 1 2 15
88-
8987
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
9088
# compiler to aid in system detection is discouraged as it requires
9189
# temporary files to be created and, as you can see below, it is a
@@ -96,34 +94,38 @@ trap 'exit 1' 1 2 15
9694

9795
# Portable tmp directory creation inspired by the Autoconf team.
9896

99-
set_cc_for_build='
100-
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
101-
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
102-
: ${TMPDIR=/tmp} ;
103-
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
104-
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
105-
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
106-
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
107-
dummy=$tmp/dummy ;
108-
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109-
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
110-
,,) echo "int x;" > "$dummy.c" ;
111-
for c in cc gcc c89 c99 ; do
112-
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
113-
CC_FOR_BUILD="$c"; break ;
114-
fi ;
115-
done ;
116-
if test x"$CC_FOR_BUILD" = x ; then
117-
CC_FOR_BUILD=no_compiler_found ;
118-
fi
119-
;;
120-
,,*) CC_FOR_BUILD=$CC ;;
121-
,*,*) CC_FOR_BUILD=$HOST_CC ;;
122-
esac ; set_cc_for_build= ;'
97+
tmp=
98+
# shellcheck disable=SC2172
99+
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
100+
101+
set_cc_for_build() {
102+
: "${TMPDIR=/tmp}"
103+
# shellcheck disable=SC2039
104+
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
105+
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
106+
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
107+
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
108+
dummy=$tmp/dummy
109+
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
110+
,,) echo "int x;" > "$dummy.c"
111+
for driver in cc gcc c89 c99 ; do
112+
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
113+
CC_FOR_BUILD="$driver"
114+
break
115+
fi
116+
done
117+
if test x"$CC_FOR_BUILD" = x ; then
118+
CC_FOR_BUILD=no_compiler_found
119+
fi
120+
;;
121+
,,*) CC_FOR_BUILD=$CC ;;
122+
,*,*) CC_FOR_BUILD=$HOST_CC ;;
123+
esac
124+
}
123125

124126
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
125127
# (ghazi@noc.rutgers.edu 1994-08-24)
126-
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
128+
if test -f /.attbin/uname ; then
127129
PATH=$PATH:/.attbin ; export PATH
128130
fi
129131

@@ -138,7 +140,7 @@ Linux|GNU|GNU/*)
138140
# We could probably try harder.
139141
LIBC=gnu
140142

141-
eval "$set_cc_for_build"
143+
set_cc_for_build
142144
cat <<-EOF > "$dummy.c"
143145
#include <features.h>
144146
#if defined(__UCLIBC__)
@@ -199,7 +201,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
199201
os=netbsdelf
200202
;;
201203
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
202-
eval "$set_cc_for_build"
204+
set_cc_for_build
203205
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
204206
| grep -q __ELF__
205207
then
@@ -383,13 +385,26 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
383385
echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
384386
exit ;;
385387
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
386-
echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
388+
set_cc_for_build
389+
SUN_ARCH=sparc
390+
# If there is a compiler, see if it is configured for 64-bit objects.
391+
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
392+
# This test works for both compilers.
393+
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
394+
if (echo '#ifdef __sparcv9'; echo IS_64BIT_ARCH; echo '#endif') | \
395+
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
396+
grep IS_64BIT_ARCH >/dev/null
397+
then
398+
SUN_ARCH=sparcv9
399+
fi
400+
fi
401+
echo "$SUN_ARCH"-sun-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
387402
exit ;;
388403
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
389404
echo i386-pc-auroraux"$UNAME_RELEASE"
390405
exit ;;
391406
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
392-
eval "$set_cc_for_build"
407+
set_cc_for_build
393408
SUN_ARCH=i386
394409
# If there is a compiler, see if it is configured for 64-bit objects.
395410
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -482,7 +497,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
482497
echo clipper-intergraph-clix"$UNAME_RELEASE"
483498
exit ;;
484499
mips:*:*:UMIPS | mips:*:*:RISCos)
485-
eval "$set_cc_for_build"
500+
set_cc_for_build
486501
sed 's/^ //' << EOF > "$dummy.c"
487502
#ifdef __cplusplus
488503
#include <stdio.h> /* for printf() prototype */
@@ -579,7 +594,7 @@ EOF
579594
exit ;;
580595
*:AIX:2:3)
581596
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
582-
eval "$set_cc_for_build"
597+
set_cc_for_build
583598
sed 's/^ //' << EOF > "$dummy.c"
584599
#include <sys/systemcfg.h>
585600
@@ -660,7 +675,7 @@ EOF
660675
esac
661676
fi
662677
if [ "$HP_ARCH" = "" ]; then
663-
eval "$set_cc_for_build"
678+
set_cc_for_build
664679
sed 's/^ //' << EOF > "$dummy.c"
665680
666681
#define _HPUX_SOURCE
@@ -700,7 +715,7 @@ EOF
700715
esac
701716
if [ "$HP_ARCH" = hppa2.0w ]
702717
then
703-
eval "$set_cc_for_build"
718+
set_cc_for_build
704719

705720
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
706721
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -726,7 +741,7 @@ EOF
726741
echo ia64-hp-hpux"$HPUX_REV"
727742
exit ;;
728743
3050*:HI-UX:*:*)
729-
eval "$set_cc_for_build"
744+
set_cc_for_build
730745
sed 's/^ //' << EOF > "$dummy.c"
731746
#include <unistd.h>
732747
int
@@ -840,6 +855,17 @@ EOF
840855
*:BSD/OS:*:*)
841856
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
842857
exit ;;
858+
arm:FreeBSD:*:*)
859+
UNAME_PROCESSOR=`uname -p`
860+
set_cc_for_build
861+
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
862+
| grep -q __ARM_PCS_VFP
863+
then
864+
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
865+
else
866+
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
867+
fi
868+
exit ;;
843869
*:FreeBSD:*:*)
844870
UNAME_PROCESSOR=`/usr/bin/uname -p`
845871
case "$UNAME_PROCESSOR" in
@@ -881,7 +907,7 @@ EOF
881907
echo "$UNAME_MACHINE"-pc-uwin
882908
exit ;;
883909
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
884-
echo x86_64-unknown-cygwin
910+
echo x86_64-pc-cygwin
885911
exit ;;
886912
prep*:SunOS:5.*:*)
887913
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
@@ -922,7 +948,7 @@ EOF
922948
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
923949
exit ;;
924950
arm*:Linux:*:*)
925-
eval "$set_cc_for_build"
951+
set_cc_for_build
926952
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
927953
| grep -q __ARM_EABI__
928954
then
@@ -971,7 +997,7 @@ EOF
971997
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
972998
exit ;;
973999
mips:Linux:*:* | mips64:Linux:*:*)
974-
eval "$set_cc_for_build"
1000+
set_cc_for_build
9751001
sed 's/^ //' << EOF > "$dummy.c"
9761002
#undef CPU
9771003
#undef ${UNAME_MACHINE}
@@ -1285,7 +1311,7 @@ EOF
12851311
exit ;;
12861312
*:Darwin:*:*)
12871313
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1288-
eval "$set_cc_for_build"
1314+
set_cc_for_build
12891315
if test "$UNAME_PROCESSOR" = unknown ; then
12901316
UNAME_PROCESSOR=powerpc
12911317
fi
@@ -1358,6 +1384,7 @@ EOF
13581384
# "uname -m" is not consistent, so use $cputype instead. 386
13591385
# is converted to i386 for consistency with other x86
13601386
# operating systems.
1387+
# shellcheck disable=SC2154
13611388
if test "$cputype" = 386; then
13621389
UNAME_MACHINE=i386
13631390
else
@@ -1414,6 +1441,9 @@ EOF
14141441
amd64:Isilon\ OneFS:*:*)
14151442
echo x86_64-unknown-onefs
14161443
exit ;;
1444+
*:Unleashed:*:*)
1445+
echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
1446+
exit ;;
14171447
esac
14181448

14191449
echo "$0: unable to guess system type" >&2

‎config.sub

+553-568
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.