Browse Source

Update config.guess and config.sub

tags/REL_12_BETA1
Peter Eisentraut 2 months ago
parent
commit
ddcaa59672
2 changed files with 780 additions and 621 deletions
  1. 221
    52
      config/config.guess
  2. 559
    569
      config/config.sub

+ 221
- 52
config/config.guess View File

@@ -1,8 +1,8 @@
1 1
 #! /bin/sh
2 2
 # Attempt to guess a canonical system name.
3
-#   Copyright 1992-2018 Free Software Foundation, Inc.
3
+#   Copyright 1992-2019 Free Software Foundation, Inc.
4 4
 
5
-timestamp='2018-05-19'
5
+timestamp='2019-03-04'
6 6
 
7 7
 # This file is free software; you can redistribute it and/or modify it
8 8
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
50 50
 GNU config.guess ($timestamp)
51 51
 
52 52
 Originally written by Per Bothner.
53
-Copyright 1992-2018 Free Software Foundation, Inc.
53
+Copyright 1992-2019 Free Software Foundation, Inc.
54 54
 
55 55
 This is free software; see the source for copying conditions.  There is NO
56 56
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -84,8 +84,6 @@ if test $# != 0; then
84 84
   exit 1
85 85
 fi
86 86
 
87
-trap 'exit 1' 1 2 15
88
-
89 87
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
90 88
 # compiler to aid in system detection is discouraged as it requires
91 89
 # temporary files to be created and, as you can see below, it is a
@@ -96,34 +94,38 @@ trap 'exit 1' 1 2 15
96 94
 
97 95
 # Portable tmp directory creation inspired by the Autoconf team.
98 96
 
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
+}
123 125
 
124 126
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
125 127
 # (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
127 129
 	PATH=$PATH:/.attbin ; export PATH
128 130
 fi
129 131
 
@@ -138,7 +140,7 @@ Linux|GNU|GNU/*)
138 140
 	# We could probably try harder.
139 141
 	LIBC=gnu
140 142
 
141
-	eval "$set_cc_for_build"
143
+	set_cc_for_build
142 144
 	cat <<-EOF > "$dummy.c"
143 145
 	#include <features.h>
144 146
 	#if defined(__UCLIBC__)
@@ -199,7 +201,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
199 201
 		os=netbsdelf
200 202
 		;;
201 203
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
202
-		eval "$set_cc_for_build"
204
+		set_cc_for_build
203 205
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
204 206
 			| grep -q __ELF__
205 207
 		then
@@ -389,7 +391,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
389 391
 	echo i386-pc-auroraux"$UNAME_RELEASE"
390 392
 	exit ;;
391 393
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
392
-	eval "$set_cc_for_build"
394
+	set_cc_for_build
393 395
 	SUN_ARCH=i386
394 396
 	# If there is a compiler, see if it is configured for 64-bit objects.
395 397
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -482,7 +484,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
482 484
 	echo clipper-intergraph-clix"$UNAME_RELEASE"
483 485
 	exit ;;
484 486
     mips:*:*:UMIPS | mips:*:*:RISCos)
485
-	eval "$set_cc_for_build"
487
+	set_cc_for_build
486 488
 	sed 's/^	//' << EOF > "$dummy.c"
487 489
 #ifdef __cplusplus
488 490
 #include <stdio.h>  /* for printf() prototype */
@@ -579,7 +581,7 @@ EOF
579 581
 	exit ;;
580 582
     *:AIX:2:3)
581 583
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
582
-		eval "$set_cc_for_build"
584
+		set_cc_for_build
583 585
 		sed 's/^		//' << EOF > "$dummy.c"
584 586
 		#include <sys/systemcfg.h>
585 587
 
@@ -660,7 +662,7 @@ EOF
660 662
 		    esac
661 663
 		fi
662 664
 		if [ "$HP_ARCH" = "" ]; then
663
-		    eval "$set_cc_for_build"
665
+		    set_cc_for_build
664 666
 		    sed 's/^		//' << EOF > "$dummy.c"
665 667
 
666 668
 		#define _HPUX_SOURCE
@@ -700,7 +702,7 @@ EOF
700 702
 	esac
701 703
 	if [ "$HP_ARCH" = hppa2.0w ]
702 704
 	then
703
-	    eval "$set_cc_for_build"
705
+	    set_cc_for_build
704 706
 
705 707
 	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
706 708
 	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
@@ -726,7 +728,7 @@ EOF
726 728
 	echo ia64-hp-hpux"$HPUX_REV"
727 729
 	exit ;;
728 730
     3050*:HI-UX:*:*)
729
-	eval "$set_cc_for_build"
731
+	set_cc_for_build
730 732
 	sed 's/^	//' << EOF > "$dummy.c"
731 733
 	#include <unistd.h>
732 734
 	int
@@ -840,6 +842,17 @@ EOF
840 842
     *:BSD/OS:*:*)
841 843
 	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
842 844
 	exit ;;
845
+    arm:FreeBSD:*:*)
846
+	UNAME_PROCESSOR=`uname -p`
847
+	set_cc_for_build
848
+	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
849
+	    | grep -q __ARM_PCS_VFP
850
+	then
851
+	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
852
+	else
853
+	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
854
+	fi
855
+	exit ;;
843 856
     *:FreeBSD:*:*)
844 857
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
845 858
 	case "$UNAME_PROCESSOR" in
@@ -881,7 +894,7 @@ EOF
881 894
 	echo "$UNAME_MACHINE"-pc-uwin
882 895
 	exit ;;
883 896
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
884
-	echo x86_64-unknown-cygwin
897
+	echo x86_64-pc-cygwin
885 898
 	exit ;;
886 899
     prep*:SunOS:5.*:*)
887 900
 	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
@@ -894,8 +907,8 @@ EOF
894 907
 	# other systems with GNU libc and userland
895 908
 	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
896 909
 	exit ;;
897
-    i*86:Minix:*:*)
898
-	echo "$UNAME_MACHINE"-pc-minix
910
+    *:Minix:*:*)
911
+	echo "$UNAME_MACHINE"-unknown-minix
899 912
 	exit ;;
900 913
     aarch64:Linux:*:*)
901 914
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -922,7 +935,7 @@ EOF
922 935
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
923 936
 	exit ;;
924 937
     arm*:Linux:*:*)
925
-	eval "$set_cc_for_build"
938
+	set_cc_for_build
926 939
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
927 940
 	    | grep -q __ARM_EABI__
928 941
 	then
@@ -971,23 +984,51 @@ EOF
971 984
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
972 985
 	exit ;;
973 986
     mips:Linux:*:* | mips64:Linux:*:*)
974
-	eval "$set_cc_for_build"
987
+	set_cc_for_build
988
+	IS_GLIBC=0
989
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
975 990
 	sed 's/^	//' << EOF > "$dummy.c"
976 991
 	#undef CPU
977
-	#undef ${UNAME_MACHINE}
978
-	#undef ${UNAME_MACHINE}el
992
+	#undef mips
993
+	#undef mipsel
994
+	#undef mips64
995
+	#undef mips64el
996
+	#if ${IS_GLIBC} && defined(_ABI64)
997
+	LIBCABI=gnuabi64
998
+	#else
999
+	#if ${IS_GLIBC} && defined(_ABIN32)
1000
+	LIBCABI=gnuabin32
1001
+	#else
1002
+	LIBCABI=${LIBC}
1003
+	#endif
1004
+	#endif
1005
+
1006
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1007
+	CPU=mipsisa64r6
1008
+	#else
1009
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1010
+	CPU=mipsisa32r6
1011
+	#else
1012
+	#if defined(__mips64)
1013
+	CPU=mips64
1014
+	#else
1015
+	CPU=mips
1016
+	#endif
1017
+	#endif
1018
+	#endif
1019
+
979 1020
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
980
-	CPU=${UNAME_MACHINE}el
1021
+	MIPS_ENDIAN=el
981 1022
 	#else
982 1023
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
983
-	CPU=${UNAME_MACHINE}
1024
+	MIPS_ENDIAN=
984 1025
 	#else
985
-	CPU=
1026
+	MIPS_ENDIAN=
986 1027
 	#endif
987 1028
 	#endif
988 1029
 EOF
989
-	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
990
-	test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
1030
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
1031
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
991 1032
 	;;
992 1033
     mips64el:Linux:*:*)
993 1034
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -1100,7 +1141,7 @@ EOF
1100 1141
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
1101 1142
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1102 1143
 	esac
1103
-	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1144
+	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
1104 1145
 	exit ;;
1105 1146
     i*86:*:3.2:*)
1106 1147
 	if test -f /usr/options/cb.name; then
@@ -1285,7 +1326,7 @@ EOF
1285 1326
 	exit ;;
1286 1327
     *:Darwin:*:*)
1287 1328
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1288
-	eval "$set_cc_for_build"
1329
+	set_cc_for_build
1289 1330
 	if test "$UNAME_PROCESSOR" = unknown ; then
1290 1331
 	    UNAME_PROCESSOR=powerpc
1291 1332
 	fi
@@ -1358,6 +1399,7 @@ EOF
1358 1399
 	# "uname -m" is not consistent, so use $cputype instead. 386
1359 1400
 	# is converted to i386 for consistency with other x86
1360 1401
 	# operating systems.
1402
+	# shellcheck disable=SC2154
1361 1403
 	if test "$cputype" = 386; then
1362 1404
 	    UNAME_MACHINE=i386
1363 1405
 	else
@@ -1414,8 +1456,135 @@ EOF
1414 1456
     amd64:Isilon\ OneFS:*:*)
1415 1457
 	echo x86_64-unknown-onefs
1416 1458
 	exit ;;
1459
+    *:Unleashed:*:*)
1460
+	echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
1461
+	exit ;;
1417 1462
 esac
1418 1463
 
1464
+# No uname command or uname output not recognized.
1465
+set_cc_for_build
1466
+cat > "$dummy.c" <<EOF
1467
+#ifdef _SEQUENT_
1468
+#include <sys/types.h>
1469
+#include <sys/utsname.h>
1470
+#endif
1471
+main ()
1472
+{
1473
+#if defined (sony)
1474
+#if defined (MIPSEB)
1475
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1476
+     I don't know....  */
1477
+  printf ("mips-sony-bsd\n"); exit (0);
1478
+#else
1479
+#include <sys/param.h>
1480
+  printf ("m68k-sony-newsos%s\n",
1481
+#ifdef NEWSOS4
1482
+  "4"
1483
+#else
1484
+  ""
1485
+#endif
1486
+  ); exit (0);
1487
+#endif
1488
+#endif
1489
+
1490
+#if defined (NeXT)
1491
+#if !defined (__ARCHITECTURE__)
1492
+#define __ARCHITECTURE__ "m68k"
1493
+#endif
1494
+  int version;
1495
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1496
+  if (version < 4)
1497
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1498
+  else
1499
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1500
+  exit (0);
1501
+#endif
1502
+
1503
+#if defined (MULTIMAX) || defined (n16)
1504
+#if defined (UMAXV)
1505
+  printf ("ns32k-encore-sysv\n"); exit (0);
1506
+#else
1507
+#if defined (CMU)
1508
+  printf ("ns32k-encore-mach\n"); exit (0);
1509
+#else
1510
+  printf ("ns32k-encore-bsd\n"); exit (0);
1511
+#endif
1512
+#endif
1513
+#endif
1514
+
1515
+#if defined (__386BSD__)
1516
+  printf ("i386-pc-bsd\n"); exit (0);
1517
+#endif
1518
+
1519
+#if defined (sequent)
1520
+#if defined (i386)
1521
+  printf ("i386-sequent-dynix\n"); exit (0);
1522
+#endif
1523
+#if defined (ns32000)
1524
+  printf ("ns32k-sequent-dynix\n"); exit (0);
1525
+#endif
1526
+#endif
1527
+
1528
+#if defined (_SEQUENT_)
1529
+  struct utsname un;
1530
+
1531
+  uname(&un);
1532
+  if (strncmp(un.version, "V2", 2) == 0) {
1533
+    printf ("i386-sequent-ptx2\n"); exit (0);
1534
+  }
1535
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1536
+    printf ("i386-sequent-ptx1\n"); exit (0);
1537
+  }
1538
+  printf ("i386-sequent-ptx\n"); exit (0);
1539
+#endif
1540
+
1541
+#if defined (vax)
1542
+#if !defined (ultrix)
1543
+#include <sys/param.h>
1544
+#if defined (BSD)
1545
+#if BSD == 43
1546
+  printf ("vax-dec-bsd4.3\n"); exit (0);
1547
+#else
1548
+#if BSD == 199006
1549
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
1550
+#else
1551
+  printf ("vax-dec-bsd\n"); exit (0);
1552
+#endif
1553
+#endif
1554
+#else
1555
+  printf ("vax-dec-bsd\n"); exit (0);
1556
+#endif
1557
+#else
1558
+  printf ("vax-dec-ultrix\n"); exit (0);
1559
+#endif
1560
+#endif
1561
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1562
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1563
+#include <signal.h>
1564
+#if defined(_SIZE_T_) /* >= ULTRIX4 */
1565
+  printf ("mips-dec-ultrix4\n"); exit (0);
1566
+#else
1567
+#if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST)
1568
+  printf ("mips-dec-ultrix3\n"); exit (0);
1569
+#endif
1570
+#endif
1571
+#endif
1572
+#endif
1573
+
1574
+#if defined (alliant) && defined (i860)
1575
+  printf ("i860-alliant-bsd\n"); exit (0);
1576
+#endif
1577
+
1578
+  exit (1);
1579
+}
1580
+EOF
1581
+
1582
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1583
+	{ echo "$SYSTEM_NAME"; exit; }
1584
+
1585
+# Apollos put the system type in the environment.
1586
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
1587
+
1419 1588
 echo "$0: unable to guess system type" >&2
1420 1589
 
1421 1590
 case "$UNAME_MACHINE:$UNAME_SYSTEM" in

+ 559
- 569
config/config.sub
File diff suppressed because it is too large
View File


Loading…
Cancel
Save