mozilla-ppc64le-build.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Sat, 26 Apr 2014 14:26:07 +0200
changeset 726 cc8d77a6a0b6
parent 710 5341dc98d26c
child 723 2917b25ec806
permissions -rw-r--r--
remove obsolete firefox-browser-css.patch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
710
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     1
# HG changeset patch
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     2
# Parent 007cf000fdf7c5048939a87f63165a67fd9db5f6
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     3
# User Ulrich Weigand <uweigand@de.ibm.com>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     4
Bug 976648 - powerpc64le-linux support - toplevel build/config
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     5
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     6
diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     7
--- a/build/autoconf/config.guess
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     8
+++ b/build/autoconf/config.guess
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     9
@@ -1,47 +1,41 @@
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    10
 #! /bin/sh
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    11
 # Attempt to guess a canonical system name.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    12
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    13
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    14
-#   Free Software Foundation, Inc.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    15
+#   Copyright 1992-2014 Free Software Foundation, Inc.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    16
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    17
-timestamp='2009-08-19'
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    18
+timestamp='2014-02-12'
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    19
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    20
 # This file is free software; you can redistribute it and/or modify it
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    21
 # under the terms of the GNU General Public License as published by
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    22
-# the Free Software Foundation; either version 2 of the License, or
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    23
+# the Free Software Foundation; either version 3 of the License, or
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    24
 # (at your option) any later version.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    25
 #
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    26
 # This program is distributed in the hope that it will be useful, but
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    27
 # WITHOUT ANY WARRANTY; without even the implied warranty of
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    28
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    29
 # General Public License for more details.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    30
 #
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    31
 # You should have received a copy of the GNU General Public License
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    32
-# along with this program; if not, write to the Free Software
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    33
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    34
-# 02110-1301, USA.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    35
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    36
 #
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    37
 # As a special exception to the GNU General Public License, if you
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    38
 # distribute this file as part of a program that contains a
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    39
 # configuration script generated by Autoconf, you may include it under
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    40
-# the same distribution terms that you use for the rest of that program.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    41
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    42
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    43
-# Originally written by Per Bothner.  Please send patches (context
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    44
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    45
-# entry.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    46
+# the same distribution terms that you use for the rest of that
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    47
+# program.  This Exception is an additional permission under section 7
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    48
+# of the GNU General Public License, version 3 ("GPLv3").
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    49
 #
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    50
-# This script attempts to guess a canonical system name similar to
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    51
-# config.sub.  If it succeeds, it prints the system name on stdout, and
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    52
-# exits with 0.  Otherwise, it exits with 1.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    53
+# Originally written by Per Bothner.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    54
 #
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    55
 # You can get the latest version of this script from:
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    56
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    57
+#
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    58
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    59
+
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    60
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    61
 me=`echo "$0" | sed -e 's,.*/,,'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    62
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    63
 usage="\
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    64
 Usage: $0 [OPTION]
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    65
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    66
 Output the configuration name of the system \`$me' is run on.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    67
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    68
@@ -51,18 +45,17 @@ Operation modes:
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    69
   -v, --version      print version number, then exit
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    70
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    71
 Report bugs and patches to <config-patches@gnu.org>."
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    72
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    73
 version="\
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    74
 GNU config.guess ($timestamp)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    75
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    76
 Originally written by Per Bothner.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    77
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    78
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    79
+Copyright 1992-2014 Free Software Foundation, Inc.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    80
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    81
 This is free software; see the source for copying conditions.  There is NO
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    82
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    83
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    84
 help="
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    85
 Try \`$me --help' for more information."
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    86
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    87
 # Parse command line
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    88
@@ -134,22 +127,43 @@ if (test -f /.attbin/uname) >/dev/null 2
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    89
 	PATH=$PATH:/.attbin ; export PATH
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    90
 fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    91
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    92
 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    93
 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    94
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    95
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    96
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    97
+case "${UNAME_SYSTEM}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    98
+Linux|GNU|GNU/*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    99
+	# If the system lacks a compiler, then just pick glibc.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   100
+	# We could probably try harder.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   101
+	LIBC=gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   102
+
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   103
+	eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   104
+	cat <<-EOF > $dummy.c
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   105
+	#include <features.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   106
+	#if defined(__UCLIBC__)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   107
+	LIBC=uclibc
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   108
+	#elif defined(__dietlibc__)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   109
+	LIBC=dietlibc
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   110
+	#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   111
+	LIBC=gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   112
+	#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   113
+	EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   114
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   115
+	;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   116
+esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   117
+
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   118
 # Note: order is significant - the case branches are not exclusive.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   119
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   120
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   121
     *:NetBSD:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   122
 	# NetBSD (nbsd) targets should (where applicable) match one or
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   123
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   124
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   125
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   126
 	# switched to ELF, *-*-netbsd* would select the old
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   127
 	# object file format.  This provides both forward
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   128
 	# compatibility and a consistent mechanism for selecting the
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   129
 	# object file format.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   130
 	#
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   131
 	# Note: NetBSD doesn't particularly care about the vendor
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   132
 	# portion of the name.  We always set it to "unknown".
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   133
@@ -175,17 +189,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   134
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   135
 		    # Return netbsd for either.  FIX?
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   136
 		    os=netbsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   137
 		else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   138
 		    os=netbsdelf
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   139
 		fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   140
 		;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   141
 	    *)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   142
-	        os=netbsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   143
+		os=netbsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   144
 		;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   145
 	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   146
 	# The OS release
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   147
 	# Debian GNU/NetBSD machines have a different userland, and
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   148
 	# thus, need a distinct triplet. However, they do not need
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   149
 	# kernel version information, so it can be replaced with a
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   150
 	# suitable tag, in the style of linux-gnu.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   151
 	case "${UNAME_VERSION}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   152
@@ -196,16 +210,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   153
 		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   154
 		;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   155
 	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   156
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   157
 	# contains redundant information, the shorter form:
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   158
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   159
 	echo "${machine}-${os}${release}"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   160
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   161
+    *:Bitrig:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   162
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   163
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   164
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   165
     *:OpenBSD:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   166
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   167
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   168
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   169
     *:ekkoBSD:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   170
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   171
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   172
     *:SolidBSD:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   173
@@ -218,17 +236,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   174
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   175
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   176
     alpha:OSF1:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   177
 	case $UNAME_RELEASE in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   178
 	*4.0)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   179
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   180
 		;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   181
 	*5.*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   182
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   183
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   184
 		;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   185
 	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   186
 	# According to Compaq, /usr/sbin/psrinfo has been available on
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   187
 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   188
 	# covers most systems running today.  This code pipes the CPU
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   189
 	# types through head -n 1, so we only detect the type of CPU 0.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   190
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   191
 	case "$ALPHA_CPU_TYPE" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   192
@@ -264,17 +282,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   193
 		UNAME_MACHINE="alphaev79" ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   194
 	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   195
 	# A Pn.n version is a patched version.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   196
 	# A Vn.n version is a released version.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   197
 	# A Tn.n version is a released field test version.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   198
 	# A Xn.n version is an unreleased experimental baselevel.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   199
 	# 1.2 uses "1.2" for uname -r.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   200
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   201
-	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   202
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   203
+	exitcode=$?
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   204
+	trap '' 0
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   205
+	exit $exitcode ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   206
     Alpha\ *:Windows_NT*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   207
 	# How do we know it's Interix rather than the generic POSIX subsystem?
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   208
 	# Should we change UNAME_MACHINE based on the output of uname instead
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   209
 	# of the specific Alpha model?
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   210
 	echo alpha-pc-interix
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   211
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   212
     21064:Windows_NT:50:3)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   213
 	echo alpha-dec-winnt3.5
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   214
@@ -290,22 +311,22 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   215
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   216
     *:OS/390:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   217
 	echo i370-ibm-openedition
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   218
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   219
     *:z/VM:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   220
 	echo s390-ibm-zvmoe
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   221
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   222
     *:OS400:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   223
-        echo powerpc-ibm-os400
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   224
+	echo powerpc-ibm-os400
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   225
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   226
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   227
 	echo arm-acorn-riscix${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   228
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   229
-    arm:riscos:*:*|arm:RISCOS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   230
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   231
 	echo arm-unknown-riscos
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   232
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   233
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   234
 	echo hppa1.1-hitachi-hiuxmpp
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   235
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   236
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   237
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   238
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   239
@@ -328,16 +349,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   240
 	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   241
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   242
     sun4H:SunOS:5.*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   243
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   244
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   245
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   246
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   247
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   248
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   249
+	echo i386-pc-auroraux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   250
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   251
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   252
 	eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   253
 	SUN_ARCH="i386"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   254
 	# If there is a compiler, see if it is configured for 64-bit objects.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   255
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   256
 	# This test works for both compilers.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   257
 	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   258
 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   259
@@ -386,33 +410,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   260
     # can be virtually everything (everything which is not
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   261
     # "atarist" or "atariste" at least should have a processor
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   262
     # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   263
     # to the lowercase version "mint" (or "freemint").  Finally
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   264
     # the system name "TOS" denotes a system which is actually not
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   265
     # MiNT.  But MiNT is downward compatible to TOS, so this should
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   266
     # be no problem.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   267
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   268
-        echo m68k-atari-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   269
+	echo m68k-atari-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   270
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   271
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   272
 	echo m68k-atari-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   273
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   274
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   275
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   276
-        echo m68k-atari-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   277
+	echo m68k-atari-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   278
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   279
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   280
-        echo m68k-milan-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   281
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   282
+	echo m68k-milan-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   283
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   284
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   285
-        echo m68k-hades-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   286
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   287
+	echo m68k-hades-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   288
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   289
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   290
-        echo m68k-unknown-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   291
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   292
+	echo m68k-unknown-mint${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   293
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   294
     m68k:machten:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   295
 	echo m68k-apple-machten${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   296
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   297
     powerpc:machten:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   298
 	echo powerpc-apple-machten${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   299
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   300
     RISC*:Mach:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   301
 	echo mips-dec-mach_bsd4.3
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   302
@@ -472,31 +496,31 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   303
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   304
     m88k:*:4*:R4*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   305
 	echo m88k-motorola-sysv4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   306
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   307
     m88k:*:3*:R3*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   308
 	echo m88k-motorola-sysv3
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   309
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   310
     AViiON:dgux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   311
-        # DG/UX returns AViiON for all architectures
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   312
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   313
+	# DG/UX returns AViiON for all architectures
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   314
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   315
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   316
 	then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   317
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   318
 	       [ ${TARGET_BINARY_INTERFACE}x = x ]
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   319
 	    then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   320
 		echo m88k-dg-dgux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   321
 	    else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   322
 		echo m88k-dg-dguxbcs${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   323
 	    fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   324
 	else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   325
 	    echo i586-dg-dgux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   326
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   327
- 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   328
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   329
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   330
 	echo m88k-dolphin-sysv3
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   331
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   332
     M88*:*:R3*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   333
 	# Delta 88k system running SVR3
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   334
 	echo m88k-motorola-sysv3
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   335
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   336
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   337
@@ -543,17 +567,17 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   338
 			echo rs6000-ibm-aix3.2.5
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   339
 		fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   340
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   341
 		echo rs6000-ibm-aix3.2.4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   342
 	else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   343
 		echo rs6000-ibm-aix3.2
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   344
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   345
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   346
-    *:AIX:*:[456])
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   347
+    *:AIX:*:[4567])
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   348
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   349
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   350
 		IBM_ARCH=rs6000
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   351
 	else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   352
 		IBM_ARCH=powerpc
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   353
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   354
 	if [ -x /usr/bin/oslevel ] ; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   355
 		IBM_REV=`/usr/bin/oslevel`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   356
@@ -586,62 +610,62 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   357
     9000/[34678]??:HP-UX:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   358
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   359
 	case "${UNAME_MACHINE}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   360
 	    9000/31? )            HP_ARCH=m68000 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   361
 	    9000/[34]?? )         HP_ARCH=m68k ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   362
 	    9000/[678][0-9][0-9])
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   363
 		if [ -x /usr/bin/getconf ]; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   364
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   365
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   366
-                    case "${sc_cpu_version}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   367
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   368
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   369
-                      532)                      # CPU_PA_RISC2_0
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   370
-                        case "${sc_kernel_bits}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   371
-                          32) HP_ARCH="hppa2.0n" ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   372
-                          64) HP_ARCH="hppa2.0w" ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   373
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   374
+		    case "${sc_cpu_version}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   375
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   376
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   377
+		      532)                      # CPU_PA_RISC2_0
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   378
+			case "${sc_kernel_bits}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   379
+			  32) HP_ARCH="hppa2.0n" ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   380
+			  64) HP_ARCH="hppa2.0w" ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   381
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   382
-                        esac ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   383
-                    esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   384
+			esac ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   385
+		    esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   386
 		fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   387
 		if [ "${HP_ARCH}" = "" ]; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   388
 		    eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   389
-		    sed 's/^              //' << EOF >$dummy.c
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   390
+		    sed 's/^		//' << EOF >$dummy.c
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   391
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   392
-              #define _HPUX_SOURCE
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   393
-              #include <stdlib.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   394
-              #include <unistd.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   395
+		#define _HPUX_SOURCE
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   396
+		#include <stdlib.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   397
+		#include <unistd.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   398
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   399
-              int main ()
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   400
-              {
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   401
-              #if defined(_SC_KERNEL_BITS)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   402
-                  long bits = sysconf(_SC_KERNEL_BITS);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   403
-              #endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   404
-                  long cpu  = sysconf (_SC_CPU_VERSION);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   405
+		int main ()
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   406
+		{
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   407
+		#if defined(_SC_KERNEL_BITS)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   408
+		    long bits = sysconf(_SC_KERNEL_BITS);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   409
+		#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   410
+		    long cpu  = sysconf (_SC_CPU_VERSION);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   411
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   412
-                  switch (cpu)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   413
-              	{
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   414
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   415
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   416
-              	case CPU_PA_RISC2_0:
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   417
-              #if defined(_SC_KERNEL_BITS)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   418
-              	    switch (bits)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   419
-              		{
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   420
-              		case 64: puts ("hppa2.0w"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   421
-              		case 32: puts ("hppa2.0n"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   422
-              		default: puts ("hppa2.0"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   423
-              		} break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   424
-              #else  /* !defined(_SC_KERNEL_BITS) */
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   425
-              	    puts ("hppa2.0"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   426
-              #endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   427
-              	default: puts ("hppa1.0"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   428
-              	}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   429
-                  exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   430
-              }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   431
+		    switch (cpu)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   432
+			{
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   433
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   434
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   435
+			case CPU_PA_RISC2_0:
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   436
+		#if defined(_SC_KERNEL_BITS)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   437
+			    switch (bits)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   438
+				{
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   439
+				case 64: puts ("hppa2.0w"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   440
+				case 32: puts ("hppa2.0n"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   441
+				default: puts ("hppa2.0"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   442
+				} break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   443
+		#else  /* !defined(_SC_KERNEL_BITS) */
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   444
+			    puts ("hppa2.0"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   445
+		#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   446
+			default: puts ("hppa1.0"); break;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   447
+			}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   448
+		    exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   449
+		}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   450
 EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   451
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   452
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   453
 		fi ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   454
 	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   455
 	if [ ${HP_ARCH} = "hppa2.0w" ]
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   456
 	then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   457
 	    eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   458
@@ -722,32 +746,32 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   459
 	    echo ${UNAME_MACHINE}-unknown-osf1
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   460
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   461
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   462
     parisc*:Lites*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   463
 	echo hppa1.1-hp-lites
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   464
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   465
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   466
 	echo c1-convex-bsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   467
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   468
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   469
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   470
 	if getsysinfo -f scalar_acc
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   471
 	then echo c32-convex-bsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   472
 	else echo c2-convex-bsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   473
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   474
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   475
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   476
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   477
 	echo c34-convex-bsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   478
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   479
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   480
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   481
 	echo c38-convex-bsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   482
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   483
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   484
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   485
 	echo c4-convex-bsd
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   486
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   487
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   488
     CRAY*Y-MP:*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   489
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   490
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   491
     CRAY*[A-Z]90:*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   492
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   493
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   494
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   495
 	      -e 's/\.[^.]*$/.X/'
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   496
@@ -761,63 +785,68 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   497
     CRAY*SV1:*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   498
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   499
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   500
     *:UNICOS/mp:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   501
 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   502
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   503
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   504
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   505
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   506
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   507
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   508
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   509
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   510
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   511
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   512
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   513
     5000:UNIX_System_V:4.*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   514
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   515
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   516
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   517
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   518
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   519
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   520
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   521
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   522
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   523
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   524
     sparc*:BSD/OS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   525
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   526
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   527
     *:BSD/OS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   528
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   529
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   530
     *:FreeBSD:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   531
-	case ${UNAME_MACHINE} in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   532
-	    pc98)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   533
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   534
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   535
+	case ${UNAME_PROCESSOR} in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   536
 	    amd64)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   537
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   538
 	    *)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   539
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   540
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   541
 	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   542
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   543
     i*:CYGWIN*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   544
 	echo ${UNAME_MACHINE}-pc-cygwin
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   545
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   546
+    *:MINGW64*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   547
+	echo ${UNAME_MACHINE}-pc-mingw64
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   548
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   549
     *:MINGW*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   550
 	echo ${UNAME_MACHINE}-pc-mingw32
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   551
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   552
+    i*:MSYS*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   553
+	echo ${UNAME_MACHINE}-pc-msys
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   554
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   555
     i*:windows32*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   556
-    	# uname -m includes "-pc" on this system.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   557
-    	echo ${UNAME_MACHINE}-mingw32
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   558
+	# uname -m includes "-pc" on this system.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   559
+	echo ${UNAME_MACHINE}-mingw32
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   560
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   561
     i*:PW*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   562
 	echo ${UNAME_MACHINE}-pc-pw32
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   563
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   564
-    *:Interix*:[3456]*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   565
-    	case ${UNAME_MACHINE} in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   566
+    *:Interix*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   567
+	case ${UNAME_MACHINE} in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   568
 	    x86)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   569
 		echo i586-pc-interix${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   570
 		exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   571
-	    EM64T | authenticamd | genuineintel)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   572
+	    authenticamd | genuineintel | EM64T)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   573
 		echo x86_64-unknown-interix${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   574
 		exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   575
 	    IA64)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   576
 		echo ia64-unknown-interix${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   577
 		exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   578
 	esac ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   579
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   580
 	echo i${UNAME_MACHINE}-pc-mks
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   581
@@ -840,55 +869,91 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   582
     p*:CYGWIN*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   583
 	echo powerpcle-unknown-cygwin
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   584
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   585
     prep*:SunOS:5.*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   586
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   587
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   588
     *:GNU:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   589
 	# the GNU system
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   590
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   591
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   592
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   593
     *:GNU/*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   594
 	# other systems with GNU libc and userland
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   595
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   596
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   597
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   598
     i*86:Minix:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   599
 	echo ${UNAME_MACHINE}-pc-minix
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   600
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   601
+    aarch64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   602
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   603
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   604
+    aarch64_be:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   605
+	UNAME_MACHINE=aarch64_be
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   606
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   607
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   608
+    alpha:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   609
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   610
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   611
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   612
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   613
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   614
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   615
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   616
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   617
+	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   618
+	objdump --private-headers /bin/sh | grep -q ld.so.1
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   619
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   620
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   621
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   622
+    arc:Linux:*:* | arceb:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   623
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   624
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   625
     arm*:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   626
 	eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   627
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   628
 	    | grep -q __ARM_EABI__
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   629
 	then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   630
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   631
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   632
 	else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   633
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   634
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   635
+		| grep -q __ARM_PCS_VFP
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   636
+	    then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   637
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   638
+	    else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   639
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   640
+	    fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   641
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   642
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   643
     avr32*:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   644
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   645
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   646
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   647
     cris:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   648
-	echo cris-axis-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   649
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   650
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   651
     crisv32:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   652
-	echo crisv32-axis-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   653
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   654
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   655
     frv:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   656
-    	echo frv-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   657
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   658
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   659
+    hexagon:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   660
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   661
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   662
+    i*86:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   663
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   664
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   665
     ia64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   666
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   667
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   668
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   669
     m32r*:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   670
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   671
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   672
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   673
     m68*:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   674
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   675
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   676
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   677
     mips:Linux:*:* | mips64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   678
 	eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   679
 	sed 's/^	//' << EOF >$dummy.c
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   680
 	#undef CPU
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   681
 	#undef ${UNAME_MACHINE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   682
 	#undef ${UNAME_MACHINE}el
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   683
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   684
@@ -896,145 +961,87 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   685
 	#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   686
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   687
 	CPU=${UNAME_MACHINE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   688
 	#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   689
 	CPU=
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   690
 	#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   691
 	#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   692
 EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   693
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   694
-	    /^CPU/{
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   695
-		s: ::g
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   696
-		p
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   697
-	    }'`"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   698
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   699
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   700
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   701
 	;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   702
+    or1k:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   703
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   704
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   705
     or32:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   706
-	echo or32-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   707
-	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   708
-    ppc:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   709
-	echo powerpc-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   710
-	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   711
-    ppc64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   712
-	echo powerpc64-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   713
-	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   714
-    alpha:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   715
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   716
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   717
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   718
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   719
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   720
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   721
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   722
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   723
-        esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   724
-	objdump --private-headers /bin/sh | grep -q ld.so.1
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   725
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   726
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   727
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   728
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   729
     padre:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   730
-	echo sparc-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   731
+	echo sparc-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   732
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   733
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   734
+	echo hppa64-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   735
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   736
     parisc:Linux:*:* | hppa:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   737
 	# Look for CPU level
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   738
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   739
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   740
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   741
-	  *)    echo hppa-unknown-linux-gnu ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   742
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   743
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   744
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   745
 	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   746
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   747
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   748
-	echo hppa64-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   749
+    ppc64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   750
+	echo powerpc64-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   751
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   752
+    ppc:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   753
+	echo powerpc-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   754
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   755
+    ppc64le:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   756
+	echo powerpc64le-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   757
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   758
+    ppcle:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   759
+	echo powerpcle-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   760
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   761
     s390:Linux:*:* | s390x:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   762
-	echo ${UNAME_MACHINE}-ibm-linux
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   763
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   764
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   765
     sh64*:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   766
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   767
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   768
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   769
     sh*:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   770
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   771
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   772
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   773
     sparc:Linux:*:* | sparc64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   774
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   775
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   776
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   777
+    tile*:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   778
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   779
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   780
     vax:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   781
-	echo ${UNAME_MACHINE}-dec-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   782
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   783
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   784
     x86_64:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   785
-	echo x86_64-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   786
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   787
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   788
     xtensa*:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   789
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   790
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   791
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   792
-    i*86:Linux:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   793
-	# The BFD linker knows what the default object file format is, so
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   794
-	# first see if it will tell us. cd to the root directory to prevent
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   795
-	# problems with other programs or directories called `ld' in the path.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   796
-	# Set LC_ALL=C to ensure ld outputs messages in English.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   797
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   798
-			 | sed -ne '/supported targets:/!d
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   799
-				    s/[ 	][ 	]*/ /g
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   800
-				    s/.*supported targets: *//
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   801
-				    s/ .*//
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   802
-				    p'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   803
-        case "$ld_supported_targets" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   804
-	  elf32-i386)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   805
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   806
-		;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   807
-	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   808
-	# Determine whether the default compiler is a.out or elf
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   809
-	eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   810
-	sed 's/^	//' << EOF >$dummy.c
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   811
-	#include <features.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   812
-	#ifdef __ELF__
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   813
-	# ifdef __GLIBC__
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   814
-	#  if __GLIBC__ >= 2
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   815
-	LIBC=gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   816
-	#  else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   817
-	LIBC=gnulibc1
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   818
-	#  endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   819
-	# else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   820
-	LIBC=gnulibc1
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   821
-	# endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   822
-	#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   823
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   824
-	LIBC=gnu
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   825
-	#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   826
-	LIBC=gnuaout
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   827
-	#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   828
-	#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   829
-	#ifdef __dietlibc__
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   830
-	LIBC=dietlibc
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   831
-	#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   832
-EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   833
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   834
-	    /^LIBC/{
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   835
-		s: ::g
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   836
-		p
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   837
-	    }'`"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   838
-	test x"${LIBC}" != x && {
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   839
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   840
-		exit
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   841
-	}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   842
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   843
-	;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   844
     i*86:DYNIX/ptx:4*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   845
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   846
 	# earlier versions are messed up and put the nodename in both
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   847
 	# sysname and nodename.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   848
 	echo i386-sequent-sysv4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   849
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   850
     i*86:UNIX_SV:4.2MP:2.*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   851
-        # Unixware is an offshoot of SVR4, but it has its own version
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   852
-        # number series starting with 2...
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   853
-        # I am not positive that other SVR4 systems won't match this,
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   854
+	# Unixware is an offshoot of SVR4, but it has its own version
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   855
+	# number series starting with 2...
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   856
+	# I am not positive that other SVR4 systems won't match this,
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   857
 	# I just have to hope.  -- rms.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   858
-        # Use sysv4.2uw... so that sysv4* matches it.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   859
+	# Use sysv4.2uw... so that sysv4* matches it.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   860
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   861
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   862
     i*86:OS/2:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   863
 	# If we were able to find `uname', then EMX Unix compatibility
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   864
 	# is probably installed.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   865
 	echo ${UNAME_MACHINE}-pc-os2-emx
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   866
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   867
     i*86:XTS-300:*:STOP)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   868
@@ -1056,17 +1063,17 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   869
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   870
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   871
 		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   872
 	else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   873
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   874
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   875
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   876
     i*86:*:5:[678]*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   877
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   878
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   879
 	case `/bin/uname -X | grep "^Machine"` in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   880
 	    *486*)	     UNAME_MACHINE=i486 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   881
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   882
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   883
 	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   884
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   885
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   886
     i*86:*:3.2:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   887
@@ -1084,23 +1091,23 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   888
 			&& UNAME_MACHINE=i686
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   889
 		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   890
 	else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   891
 		echo ${UNAME_MACHINE}-pc-sysv32
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   892
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   893
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   894
     pc:*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   895
 	# Left here for compatibility:
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   896
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   897
-        # the processor, so we play safe by assuming i586.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   898
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   899
+	# the processor, so we play safe by assuming i586.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   900
 	# Note: whatever this is, it MUST be the same as what config.sub
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   901
 	# prints for the "djgpp" host, or else GDB configury will decide that
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   902
 	# this is a cross-build.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   903
 	echo i586-pc-msdosdjgpp
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   904
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   905
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   906
     Intel:Mach:3*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   907
 	echo i386-pc-mach3
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   908
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   909
     paragon:*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   910
 	echo i860-intel-osf1
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   911
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   912
     i860:*:4.*:*) # i860-SVR4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   913
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   914
@@ -1125,18 +1132,18 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   915
 	OS_REL=''
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   916
 	test -r /etc/.relid \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   917
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   918
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   919
 	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   920
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   921
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   922
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   923
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   924
-          && { echo i486-ncr-sysv4; exit; } ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   925
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   926
+	  && { echo i486-ncr-sysv4; exit; } ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   927
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   928
 	OS_REL='.3'
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   929
 	test -r /etc/.relid \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   930
 	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   931
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   932
 	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   933
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   934
 	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   935
@@ -1169,20 +1176,20 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   936
     *:SINIX-*:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   937
 	if uname -p 2>/dev/null >/dev/null ; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   938
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   939
 		echo ${UNAME_MACHINE}-sni-sysv4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   940
 	else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   941
 		echo ns32k-sni-sysv
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   942
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   943
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   944
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   945
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   946
-        echo i586-unisys-sysv4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   947
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   948
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   949
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   950
+	echo i586-unisys-sysv4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   951
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   952
     *:UNIX_System_V:4*:FTX*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   953
 	# From Gerald Hewes <hewes@openmarket.com>.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   954
 	# How about differentiating between stratus architectures? -djm
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   955
 	echo hppa1.1-stratus-sysv4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   956
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   957
     *:*:*:FTX*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   958
 	# From seanf@swdc.stratus.com.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   959
 	echo i860-stratus-sysv4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   960
@@ -1198,33 +1205,36 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   961
     mc68*:A/UX:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   962
 	echo m68k-apple-aux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   963
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   964
     news*:NEWS-OS:6*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   965
 	echo mips-sony-newsos6
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   966
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   967
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   968
 	if [ -d /usr/nec ]; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   969
-	        echo mips-nec-sysv${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   970
+		echo mips-nec-sysv${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   971
 	else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   972
-	        echo mips-unknown-sysv${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   973
+		echo mips-unknown-sysv${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   974
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   975
-        exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   976
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   977
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   978
 	echo powerpc-be-beos
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   979
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   980
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   981
 	echo powerpc-apple-beos
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   982
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   983
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   984
 	echo i586-pc-beos
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   985
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   986
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   987
 	echo i586-pc-haiku
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   988
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   989
+    x86_64:Haiku:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   990
+	echo x86_64-unknown-haiku
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   991
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   992
     SX-4:SUPER-UX:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   993
 	echo sx4-nec-superux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   994
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   995
     SX-5:SUPER-UX:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   996
 	echo sx5-nec-superux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   997
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   998
     SX-6:SUPER-UX:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   999
 	echo sx6-nec-superux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1000
@@ -1241,37 +1251,58 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1001
     Power*:Rhapsody:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1002
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1003
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1004
     *:Rhapsody:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1005
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1006
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1007
     *:Darwin:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1008
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1009
-	case $UNAME_PROCESSOR in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1010
-	    i386) eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1011
-	          if $CC_FOR_BUILD -E -dM -x c /dev/null | grep __LP64__>/dev/null 2>&1 ; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1012
-	            UNAME_PROCESSOR=x86_64
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1013
-	          fi ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1014
-	    unknown) UNAME_PROCESSOR=powerpc ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1015
-	esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1016
+	eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1017
+	if test "$UNAME_PROCESSOR" = unknown ; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1018
+	    UNAME_PROCESSOR=powerpc
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1019
+	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1020
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1021
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1022
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1023
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1024
+		    grep IS_64BIT_ARCH >/dev/null
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1025
+		then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1026
+		    case $UNAME_PROCESSOR in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1027
+			i386) UNAME_PROCESSOR=x86_64 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1028
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1029
+		    esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1030
+		fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1031
+	    fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1032
+	elif test "$UNAME_PROCESSOR" = i386 ; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1033
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1034
+	    # that puts up a graphical alert prompting to install
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1035
+	    # developer tools.  Any system running Mac OS X 10.7 or
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1036
+	    # later (Darwin 11 and later) is required to have a 64-bit
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1037
+	    # processor. This is not true of the ARM version of Darwin
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1038
+	    # that Apple uses in portable devices.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1039
+	    UNAME_PROCESSOR=x86_64
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1040
+	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1041
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1042
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1043
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1044
 	UNAME_PROCESSOR=`uname -p`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1045
 	if test "$UNAME_PROCESSOR" = "x86"; then
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1046
 		UNAME_PROCESSOR=i386
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1047
 		UNAME_MACHINE=pc
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1048
 	fi
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1049
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1050
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1051
     *:QNX:*:4*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1052
 	echo i386-pc-qnx
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1053
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1054
-    NSE-?:NONSTOP_KERNEL:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1055
+    NEO-?:NONSTOP_KERNEL:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1056
+	echo neo-tandem-nsk${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1057
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1058
+    NSE-*:NONSTOP_KERNEL:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1059
 	echo nse-tandem-nsk${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1060
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1061
     NSR-?:NONSTOP_KERNEL:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1062
 	echo nsr-tandem-nsk${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1063
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1064
     *:NonStop-UX:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1065
 	echo mips-compaq-nonstopux
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1066
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1067
@@ -1306,23 +1337,23 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1068
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1069
     *:TOPS-20:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1070
 	echo pdp10-unknown-tops20
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1071
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1072
     *:ITS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1073
 	echo pdp10-unknown-its
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1074
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1075
     SEI:*:*:SEIUX)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1076
-        echo mips-sei-seiux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1077
+	echo mips-sei-seiux${UNAME_RELEASE}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1078
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1079
     *:DragonFly:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1080
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1081
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1082
     *:*VMS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1083
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1084
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1085
 	case "${UNAME_MACHINE}" in
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1086
 	    A*) echo alpha-dec-vms ; exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1087
 	    I*) echo ia64-dec-vms ; exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1088
 	    V*) echo vax-dec-vms ; exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1089
 	esac ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1090
     *:XENIX:*:SysV)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1091
 	echo i386-pc-xenix
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1092
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1093
@@ -1330,169 +1361,21 @@ EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1094
 	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1095
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1096
     i*86:rdos:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1097
 	echo ${UNAME_MACHINE}-pc-rdos
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1098
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1099
     i*86:AROS:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1100
 	echo ${UNAME_MACHINE}-pc-aros
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1101
 	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1102
+    x86_64:VMkernel:*:*)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1103
+	echo ${UNAME_MACHINE}-unknown-esx
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1104
+	exit ;;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1105
 esac
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1106
 
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1107
-#echo '(No uname command or uname output not recognized.)' 1>&2
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1108
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1109
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1110
-eval $set_cc_for_build
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1111
-cat >$dummy.c <<EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1112
-#ifdef _SEQUENT_
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1113
-# include <sys/types.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1114
-# include <sys/utsname.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1115
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1116
-main ()
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1117
-{
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1118
-#if defined (sony)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1119
-#if defined (MIPSEB)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1120
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1121
-     I don't know....  */
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1122
-  printf ("mips-sony-bsd\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1123
-#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1124
-#include <sys/param.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1125
-  printf ("m68k-sony-newsos%s\n",
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1126
-#ifdef NEWSOS4
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1127
-          "4"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1128
-#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1129
-	  ""
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1130
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1131
-         ); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1132
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1133
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1134
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1135
-#if defined (__arm) && defined (__acorn) && defined (__unix)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1136
-  printf ("arm-acorn-riscix\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1137
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1138
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1139
-#if defined (hp300) && !defined (hpux)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1140
-  printf ("m68k-hp-bsd\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1141
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1142
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1143
-#if defined (NeXT)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1144
-#if !defined (__ARCHITECTURE__)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1145
-#define __ARCHITECTURE__ "m68k"
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1146
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1147
-  int version;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1148
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1149
-  if (version < 4)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1150
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1151
-  else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1152
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1153
-  exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1154
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1155
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1156
-#if defined (MULTIMAX) || defined (n16)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1157
-#if defined (UMAXV)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1158
-  printf ("ns32k-encore-sysv\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1159
-#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1160
-#if defined (CMU)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1161
-  printf ("ns32k-encore-mach\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1162
-#else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1163
-  printf ("ns32k-encore-bsd\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1164
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1165
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1166
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1167
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1168
-#if defined (__386BSD__)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1169
-  printf ("i386-pc-bsd\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1170
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1171
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1172
-#if defined (sequent)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1173
-#if defined (i386)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1174
-  printf ("i386-sequent-dynix\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1175
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1176
-#if defined (ns32000)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1177
-  printf ("ns32k-sequent-dynix\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1178
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1179
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1180
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1181
-#if defined (_SEQUENT_)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1182
-    struct utsname un;
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1183
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1184
-    uname(&un);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1185
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1186
-    if (strncmp(un.version, "V2", 2) == 0) {
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1187
-	printf ("i386-sequent-ptx2\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1188
-    }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1189
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1190
-	printf ("i386-sequent-ptx1\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1191
-    }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1192
-    printf ("i386-sequent-ptx\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1193
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1194
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1195
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1196
-#if defined (vax)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1197
-# if !defined (ultrix)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1198
-#  include <sys/param.h>
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1199
-#  if defined (BSD)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1200
-#   if BSD == 43
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1201
-      printf ("vax-dec-bsd4.3\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1202
-#   else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1203
-#    if BSD == 199006
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1204
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1205
-#    else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1206
-      printf ("vax-dec-bsd\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1207
-#    endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1208
-#   endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1209
-#  else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1210
-    printf ("vax-dec-bsd\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1211
-#  endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1212
-# else
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1213
-    printf ("vax-dec-ultrix\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1214
-# endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1215
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1216
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1217
-#if defined (alliant) && defined (i860)
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1218
-  printf ("i860-alliant-bsd\n"); exit (0);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1219
-#endif
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1220
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1221
-  exit (1);
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1222
-}
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1223
-EOF
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1224
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1225
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1226
-	{ echo "$SYSTEM_NAME"; exit; }
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1227
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1228
-# Apollos put the system type in the environment.
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1229
-
5341dc98d26c update of PPC64LE patches taken from
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1230
-