Skip to content

Commit 1e30734

Browse files
committed
Update config.guess and config.sub from
https://git.savannah.gnu.org/cgit/config.git. Backport of r1863205 from trunk resp. r1863206 from 1.7.x. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1863214 13f79535-47bb-0310-9956-ffa450edef68
1 parent b8ec427 commit 1e30734

File tree

2 files changed

+233
-62
lines changed

2 files changed

+233
-62
lines changed

build/config.guess

Lines changed: 207 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Attempt to guess a canonical system name.
33
# Copyright 1992-2019 Free Software Foundation, Inc.
44

5-
timestamp='2019-01-01'
5+
timestamp='2019-06-10'
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
@@ -262,6 +262,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
262262
*:SolidBSD:*:*)
263263
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
264264
exit ;;
265+
*:OS108:*:*)
266+
echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
267+
exit ;;
265268
macppc:MirBSD:*:*)
266269
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
267270
exit ;;
@@ -985,22 +988,50 @@ EOF
985988
exit ;;
986989
mips:Linux:*:* | mips64:Linux:*:*)
987990
set_cc_for_build
991+
IS_GLIBC=0
992+
test x"${LIBC}" = xgnu && IS_GLIBC=1
988993
sed 's/^ //' << EOF > "$dummy.c"
989994
#undef CPU
990-
#undef ${UNAME_MACHINE}
991-
#undef ${UNAME_MACHINE}el
995+
#undef mips
996+
#undef mipsel
997+
#undef mips64
998+
#undef mips64el
999+
#if ${IS_GLIBC} && defined(_ABI64)
1000+
LIBCABI=gnuabi64
1001+
#else
1002+
#if ${IS_GLIBC} && defined(_ABIN32)
1003+
LIBCABI=gnuabin32
1004+
#else
1005+
LIBCABI=${LIBC}
1006+
#endif
1007+
#endif
1008+
1009+
#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1010+
CPU=mipsisa64r6
1011+
#else
1012+
#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1013+
CPU=mipsisa32r6
1014+
#else
1015+
#if defined(__mips64)
1016+
CPU=mips64
1017+
#else
1018+
CPU=mips
1019+
#endif
1020+
#endif
1021+
#endif
1022+
9921023
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
993-
CPU=${UNAME_MACHINE}el
1024+
MIPS_ENDIAN=el
9941025
#else
9951026
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
996-
CPU=${UNAME_MACHINE}
1027+
MIPS_ENDIAN=
9971028
#else
998-
CPU=
1029+
MIPS_ENDIAN=
9991030
#endif
10001031
#endif
10011032
EOF
1002-
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
1003-
test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
1033+
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
1034+
test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
10041035
;;
10051036
mips64el:Linux:*:*)
10061037
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -1113,7 +1144,7 @@ EOF
11131144
*Pentium) UNAME_MACHINE=i586 ;;
11141145
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
11151146
esac
1116-
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1147+
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
11171148
exit ;;
11181149
i*86:*:3.2:*)
11191150
if test -f /usr/options/cb.name; then
@@ -1297,38 +1328,39 @@ EOF
12971328
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
12981329
exit ;;
12991330
*:Darwin:*:*)
1300-
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1301-
set_cc_for_build
1302-
if test "$UNAME_PROCESSOR" = unknown ; then
1303-
UNAME_PROCESSOR=powerpc
1331+
UNAME_PROCESSOR=`uname -p`
1332+
case $UNAME_PROCESSOR in
1333+
unknown) UNAME_PROCESSOR=powerpc ;;
1334+
esac
1335+
if command -v xcode-select > /dev/null 2> /dev/null && \
1336+
! xcode-select --print-path > /dev/null 2> /dev/null ; then
1337+
# Avoid executing cc if there is no toolchain installed as
1338+
# cc will be a stub that puts up a graphical alert
1339+
# prompting the user to install developer tools.
1340+
CC_FOR_BUILD=no_compiler_found
1341+
else
1342+
set_cc_for_build
13041343
fi
1305-
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1306-
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1307-
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1308-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1309-
grep IS_64BIT_ARCH >/dev/null
1310-
then
1311-
case $UNAME_PROCESSOR in
1312-
i386) UNAME_PROCESSOR=x86_64 ;;
1313-
powerpc) UNAME_PROCESSOR=powerpc64 ;;
1314-
esac
1315-
fi
1316-
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1317-
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1318-
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1319-
grep IS_PPC >/dev/null
1320-
then
1321-
UNAME_PROCESSOR=powerpc
1322-
fi
1344+
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1345+
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1346+
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1347+
grep IS_64BIT_ARCH >/dev/null
1348+
then
1349+
case $UNAME_PROCESSOR in
1350+
i386) UNAME_PROCESSOR=x86_64 ;;
1351+
powerpc) UNAME_PROCESSOR=powerpc64 ;;
1352+
esac
1353+
fi
1354+
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1355+
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1356+
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1357+
grep IS_PPC >/dev/null
1358+
then
1359+
UNAME_PROCESSOR=powerpc
13231360
fi
13241361
elif test "$UNAME_PROCESSOR" = i386 ; then
1325-
# Avoid executing cc on OS X 10.9, as it ships with a stub
1326-
# that puts up a graphical alert prompting to install
1327-
# developer tools. Any system running Mac OS X 10.7 or
1328-
# later (Darwin 11 and later) is required to have a 64-bit
1329-
# processor. This is not true of the ARM version of Darwin
1330-
# that Apple uses in portable devices.
1331-
UNAME_PROCESSOR=x86_64
1362+
# uname -m returns i386 or x86_64
1363+
UNAME_PROCESSOR=$UNAME_MACHINE
13321364
fi
13331365
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
13341366
exit ;;
@@ -1433,6 +1465,143 @@ EOF
14331465
exit ;;
14341466
esac
14351467

1468+
# No uname command or uname output not recognized.
1469+
set_cc_for_build
1470+
cat > "$dummy.c" <<EOF
1471+
#ifdef _SEQUENT_
1472+
#include <sys/types.h>
1473+
#include <sys/utsname.h>
1474+
#endif
1475+
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1476+
#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1477+
#include <signal.h>
1478+
#if defined(_SIZE_T_) || defined(SIGLOST)
1479+
#include <sys/utsname.h>
1480+
#endif
1481+
#endif
1482+
#endif
1483+
main ()
1484+
{
1485+
#if defined (sony)
1486+
#if defined (MIPSEB)
1487+
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1488+
I don't know.... */
1489+
printf ("mips-sony-bsd\n"); exit (0);
1490+
#else
1491+
#include <sys/param.h>
1492+
printf ("m68k-sony-newsos%s\n",
1493+
#ifdef NEWSOS4
1494+
"4"
1495+
#else
1496+
""
1497+
#endif
1498+
); exit (0);
1499+
#endif
1500+
#endif
1501+
1502+
#if defined (NeXT)
1503+
#if !defined (__ARCHITECTURE__)
1504+
#define __ARCHITECTURE__ "m68k"
1505+
#endif
1506+
int version;
1507+
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1508+
if (version < 4)
1509+
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1510+
else
1511+
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1512+
exit (0);
1513+
#endif
1514+
1515+
#if defined (MULTIMAX) || defined (n16)
1516+
#if defined (UMAXV)
1517+
printf ("ns32k-encore-sysv\n"); exit (0);
1518+
#else
1519+
#if defined (CMU)
1520+
printf ("ns32k-encore-mach\n"); exit (0);
1521+
#else
1522+
printf ("ns32k-encore-bsd\n"); exit (0);
1523+
#endif
1524+
#endif
1525+
#endif
1526+
1527+
#if defined (__386BSD__)
1528+
printf ("i386-pc-bsd\n"); exit (0);
1529+
#endif
1530+
1531+
#if defined (sequent)
1532+
#if defined (i386)
1533+
printf ("i386-sequent-dynix\n"); exit (0);
1534+
#endif
1535+
#if defined (ns32000)
1536+
printf ("ns32k-sequent-dynix\n"); exit (0);
1537+
#endif
1538+
#endif
1539+
1540+
#if defined (_SEQUENT_)
1541+
struct utsname un;
1542+
1543+
uname(&un);
1544+
if (strncmp(un.version, "V2", 2) == 0) {
1545+
printf ("i386-sequent-ptx2\n"); exit (0);
1546+
}
1547+
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1548+
printf ("i386-sequent-ptx1\n"); exit (0);
1549+
}
1550+
printf ("i386-sequent-ptx\n"); exit (0);
1551+
#endif
1552+
1553+
#if defined (vax)
1554+
#if !defined (ultrix)
1555+
#include <sys/param.h>
1556+
#if defined (BSD)
1557+
#if BSD == 43
1558+
printf ("vax-dec-bsd4.3\n"); exit (0);
1559+
#else
1560+
#if BSD == 199006
1561+
printf ("vax-dec-bsd4.3reno\n"); exit (0);
1562+
#else
1563+
printf ("vax-dec-bsd\n"); exit (0);
1564+
#endif
1565+
#endif
1566+
#else
1567+
printf ("vax-dec-bsd\n"); exit (0);
1568+
#endif
1569+
#else
1570+
#if defined(_SIZE_T_) || defined(SIGLOST)
1571+
struct utsname un;
1572+
uname (&un);
1573+
printf ("vax-dec-ultrix%s\n", un.release); exit (0);
1574+
#else
1575+
printf ("vax-dec-ultrix\n"); exit (0);
1576+
#endif
1577+
#endif
1578+
#endif
1579+
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1580+
#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1581+
#if defined(_SIZE_T_) || defined(SIGLOST)
1582+
struct utsname *un;
1583+
uname (&un);
1584+
printf ("mips-dec-ultrix%s\n", un.release); exit (0);
1585+
#else
1586+
printf ("mips-dec-ultrix\n"); exit (0);
1587+
#endif
1588+
#endif
1589+
#endif
1590+
1591+
#if defined (alliant) && defined (i860)
1592+
printf ("i860-alliant-bsd\n"); exit (0);
1593+
#endif
1594+
1595+
exit (1);
1596+
}
1597+
EOF
1598+
1599+
$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1600+
{ echo "$SYSTEM_NAME"; exit; }
1601+
1602+
# Apollos put the system type in the environment.
1603+
test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
1604+
14361605
echo "$0: unable to guess system type" >&2
14371606

14381607
case "$UNAME_MACHINE:$UNAME_SYSTEM" in

0 commit comments

Comments
 (0)