Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1 | #! /bin/sh |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 2 | # Configuration validation subroutine script. |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 5 | # 2011, 2012, 2013 Free Software Foundation, Inc. |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 6 | |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 7 | timestamp='2012-12-23' |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 8 | |
| 9 | # This file is (in principle) common to ALL GNU software. |
| 10 | # The presence of a machine in this file suggests that SOME GNU software |
| 11 | # can handle that machine. It does not imply ALL GNU software can. |
| 12 | # |
| 13 | # This file is free software; you can redistribute it and/or modify |
| 14 | # it under the terms of the GNU General Public License as published by |
| 15 | # the Free Software Foundation; either version 2 of the License, or |
| 16 | # (at your option) any later version. |
| 17 | # |
| 18 | # This program is distributed in the hope that it will be useful, |
| 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | # GNU General Public License for more details. |
| 22 | # |
| 23 | # You should have received a copy of the GNU General Public License |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 24 | # along with this program; if not, see <http://www.gnu.org/licenses/>. |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 25 | # |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 26 | # As a special exception to the GNU General Public License, if you |
| 27 | # distribute this file as part of a program that contains a |
| 28 | # configuration script generated by Autoconf, you may include it under |
| 29 | # the same distribution terms that you use for the rest of that program. |
| 30 | |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 31 | |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 32 | # Please send patches to <config-patches@gnu.org>. Submit a context |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 33 | # diff and a properly formatted GNU ChangeLog entry. |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 34 | # |
| 35 | # Configuration subroutine to validate and canonicalize a configuration type. |
| 36 | # Supply the specified configuration type as an argument. |
| 37 | # If it is invalid, we print an error message on stderr and exit with code 1. |
| 38 | # Otherwise, we print the canonical config type on stdout and succeed. |
| 39 | |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 40 | # You can get the latest version of this script from: |
| 41 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD |
| 42 | |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 43 | # This file is supposed to be the same for all GNU packages |
| 44 | # and recognize all the CPU types, system types and aliases |
| 45 | # that are meaningful with *any* GNU software. |
| 46 | # Each package is responsible for reporting which valid configurations |
| 47 | # it does not support. The user should be able to distinguish |
| 48 | # a failure to support a valid configuration from a meaningless |
| 49 | # configuration. |
| 50 | |
| 51 | # The goal of this file is to map all the various variations of a given |
| 52 | # machine specification into a single specification in the form: |
| 53 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
| 54 | # or in some cases, the newer four-part form: |
| 55 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
| 56 | # It is wrong to echo any other type of specification. |
| 57 | |
| 58 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 59 | |
| 60 | usage="\ |
| 61 | Usage: $0 [OPTION] CPU-MFR-OPSYS |
| 62 | $0 [OPTION] ALIAS |
| 63 | |
| 64 | Canonicalize a configuration name. |
| 65 | |
| 66 | Operation modes: |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 67 | -h, --help print this help, then exit |
| 68 | -t, --time-stamp print date of last modification, then exit |
| 69 | -v, --version print version number, then exit |
| 70 | |
| 71 | Report bugs and patches to <config-patches@gnu.org>." |
| 72 | |
| 73 | version="\ |
| 74 | GNU config.sub ($timestamp) |
| 75 | |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 76 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 77 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, |
| 78 | 2012, 2013 Free Software Foundation, Inc. |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 79 | |
| 80 | This is free software; see the source for copying conditions. There is NO |
| 81 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 82 | |
| 83 | help=" |
| 84 | Try \`$me --help' for more information." |
| 85 | |
| 86 | # Parse command line |
| 87 | while test $# -gt 0 ; do |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 88 | case $1 in |
| 89 | --time-stamp | --time* | -t ) |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 90 | echo "$timestamp" ; exit ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 91 | --version | -v ) |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 92 | echo "$version" ; exit ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 93 | --help | --h* | -h ) |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 94 | echo "$usage"; exit ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 95 | -- ) # Stop option processing |
| 96 | shift; break ;; |
| 97 | - ) # Use stdin as input. |
| 98 | break ;; |
| 99 | -* ) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 100 | echo "$me: invalid option $1$help" |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 101 | exit 1 ;; |
| 102 | |
| 103 | *local*) |
| 104 | # First pass through any local machine types. |
| 105 | echo $1 |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 106 | exit ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 107 | |
| 108 | * ) |
| 109 | break ;; |
| 110 | esac |
| 111 | done |
| 112 | |
| 113 | case $# in |
| 114 | 0) echo "$me: missing argument$help" >&2 |
| 115 | exit 1;; |
| 116 | 1) ;; |
| 117 | *) echo "$me: too many arguments$help" >&2 |
| 118 | exit 1;; |
| 119 | esac |
| 120 | |
| 121 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). |
| 122 | # Here we must recognize all the valid KERNEL-OS combinations. |
| 123 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
| 124 | case $maybe_os in |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 125 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 126 | linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 127 | knetbsd*-gnu* | netbsd*-gnu* | \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 128 | kopensolaris*-gnu* | \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 129 | storm-chaos* | os2-emx* | rtmk-nova*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 130 | os=-$maybe_os |
| 131 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
| 132 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 133 | android-linux) |
| 134 | os=-linux-android |
| 135 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown |
| 136 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 137 | *) |
| 138 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` |
| 139 | if [ $basic_machine != $1 ] |
| 140 | then os=`echo $1 | sed 's/.*-/-/'` |
| 141 | else os=; fi |
| 142 | ;; |
| 143 | esac |
| 144 | |
| 145 | ### Let's recognize common machines as not being operating systems so |
| 146 | ### that things like config.sub decstation-3100 work. We also |
| 147 | ### recognize some manufacturers as not being operating systems, so we |
| 148 | ### can provide default operating systems below. |
| 149 | case $os in |
| 150 | -sun*os*) |
| 151 | # Prevent following clause from handling this invalid input. |
| 152 | ;; |
| 153 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ |
| 154 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ |
| 155 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ |
| 156 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
| 157 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
| 158 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 159 | -apple | -axis | -knuth | -cray | -microblaze*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 160 | os= |
| 161 | basic_machine=$1 |
| 162 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 163 | -bluegene*) |
| 164 | os=-cnk |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 165 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 166 | -sim | -cisco | -oki | -wec | -winbond) |
| 167 | os= |
| 168 | basic_machine=$1 |
| 169 | ;; |
| 170 | -scout) |
| 171 | ;; |
| 172 | -wrs) |
| 173 | os=-vxworks |
| 174 | basic_machine=$1 |
| 175 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 176 | -chorusos*) |
| 177 | os=-chorusos |
| 178 | basic_machine=$1 |
| 179 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 180 | -chorusrdb) |
| 181 | os=-chorusrdb |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 182 | basic_machine=$1 |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 183 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 184 | -hiux*) |
| 185 | os=-hiuxwe2 |
| 186 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 187 | -sco6) |
| 188 | os=-sco5v6 |
| 189 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 190 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 191 | -sco5) |
| 192 | os=-sco3.2v5 |
| 193 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 194 | ;; |
| 195 | -sco4) |
| 196 | os=-sco3.2v4 |
| 197 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 198 | ;; |
| 199 | -sco3.2.[4-9]*) |
| 200 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` |
| 201 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 202 | ;; |
| 203 | -sco3.2v[4-9]*) |
| 204 | # Don't forget version if it is 3.2v4 or newer. |
| 205 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 206 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 207 | -sco5v6*) |
| 208 | # Don't forget version if it is 3.2v4 or newer. |
| 209 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 210 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 211 | -sco*) |
| 212 | os=-sco3.2v2 |
| 213 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 214 | ;; |
| 215 | -udk*) |
| 216 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 217 | ;; |
| 218 | -isc) |
| 219 | os=-isc2.2 |
| 220 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 221 | ;; |
| 222 | -clix*) |
| 223 | basic_machine=clipper-intergraph |
| 224 | ;; |
| 225 | -isc*) |
| 226 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 227 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 228 | -lynx*178) |
| 229 | os=-lynxos178 |
| 230 | ;; |
| 231 | -lynx*5) |
| 232 | os=-lynxos5 |
| 233 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 234 | -lynx*) |
| 235 | os=-lynxos |
| 236 | ;; |
| 237 | -ptx*) |
| 238 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` |
| 239 | ;; |
| 240 | -windowsnt*) |
| 241 | os=`echo $os | sed -e 's/windowsnt/winnt/'` |
| 242 | ;; |
| 243 | -psos*) |
| 244 | os=-psos |
| 245 | ;; |
| 246 | -mint | -mint[0-9]*) |
| 247 | basic_machine=m68k-atari |
| 248 | os=-mint |
| 249 | ;; |
| 250 | esac |
| 251 | |
| 252 | # Decode aliases for certain CPU-COMPANY combinations. |
| 253 | case $basic_machine in |
| 254 | # Recognize the basic CPU types without company name. |
| 255 | # Some are omitted here because they have special meanings below. |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 256 | 1750a | 580 \ |
| 257 | | a29k \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 258 | | aarch64 | aarch64_be \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 259 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ |
| 260 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 261 | | am33_2.0 \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 262 | | arc \ |
| 263 | | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ |
| 264 | | avr | avr32 \ |
| 265 | | be32 | be64 \ |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 266 | | bfin \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 267 | | c4x | clipper \ |
| 268 | | d10v | d30v | dlx | dsp16xx \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 269 | | epiphany \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 270 | | fido | fr30 | frv \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 271 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 272 | | hexagon \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 273 | | i370 | i860 | i960 | ia64 \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 274 | | ip2k | iq2000 \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 275 | | le32 | le64 \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 276 | | lm32 \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 277 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 278 | | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 279 | | mips | mipsbe | mipseb | mipsel | mipsle \ |
| 280 | | mips16 \ |
| 281 | | mips64 | mips64el \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 282 | | mips64octeon | mips64octeonel \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 283 | | mips64orion | mips64orionel \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 284 | | mips64r5900 | mips64r5900el \ |
| 285 | | mips64vr | mips64vrel \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 286 | | mips64vr4100 | mips64vr4100el \ |
| 287 | | mips64vr4300 | mips64vr4300el \ |
| 288 | | mips64vr5000 | mips64vr5000el \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 289 | | mips64vr5900 | mips64vr5900el \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 290 | | mipsisa32 | mipsisa32el \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 291 | | mipsisa32r2 | mipsisa32r2el \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 292 | | mipsisa64 | mipsisa64el \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 293 | | mipsisa64r2 | mipsisa64r2el \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 294 | | mipsisa64sb1 | mipsisa64sb1el \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 295 | | mipsisa64sr71k | mipsisa64sr71kel \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 296 | | mipstx39 | mipstx39el \ |
| 297 | | mn10200 | mn10300 \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 298 | | moxie \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 299 | | mt \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 300 | | msp430 \ |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 301 | | nds32 | nds32le | nds32be \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 302 | | nios | nios2 \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 303 | | ns16k | ns32k \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 304 | | open8 \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 305 | | or32 \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 306 | | pdp10 | pdp11 | pj | pjl \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 307 | | powerpc | powerpc64 | powerpc64le | powerpcle \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 308 | | pyramid \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 309 | | rl78 | rx \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 310 | | score \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 311 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 312 | | sh64 | sh64le \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 313 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ |
| 314 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 315 | | spu \ |
| 316 | | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 317 | | ubicom32 \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 318 | | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 319 | | we32k \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 320 | | x86 | xc16x | xstormy16 | xtensa \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 321 | | z8k | z80) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 322 | basic_machine=$basic_machine-unknown |
| 323 | ;; |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 324 | c54x) |
| 325 | basic_machine=tic54x-unknown |
| 326 | ;; |
| 327 | c55x) |
| 328 | basic_machine=tic55x-unknown |
| 329 | ;; |
| 330 | c6x) |
| 331 | basic_machine=tic6x-unknown |
| 332 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 333 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 334 | basic_machine=$basic_machine-unknown |
| 335 | os=-none |
| 336 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 337 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 338 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 339 | ms1) |
| 340 | basic_machine=mt-unknown |
| 341 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 342 | |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 343 | strongarm | thumb | xscale) |
| 344 | basic_machine=arm-unknown |
| 345 | ;; |
| 346 | xgate) |
| 347 | basic_machine=$basic_machine-unknown |
| 348 | os=-none |
| 349 | ;; |
| 350 | xscaleeb) |
| 351 | basic_machine=armeb-unknown |
| 352 | ;; |
| 353 | |
| 354 | xscaleel) |
| 355 | basic_machine=armel-unknown |
| 356 | ;; |
| 357 | |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 358 | # We use `pc' rather than `unknown' |
| 359 | # because (1) that's what they normally are, and |
| 360 | # (2) the word "unknown" tends to confuse beginning users. |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 361 | i*86 | x86_64) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 362 | basic_machine=$basic_machine-pc |
| 363 | ;; |
| 364 | # Object if more than one company name word. |
| 365 | *-*-*) |
| 366 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
| 367 | exit 1 |
| 368 | ;; |
| 369 | # Recognize the basic CPU types with company name. |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 370 | 580-* \ |
| 371 | | a29k-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 372 | | aarch64-* | aarch64_be-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 373 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ |
| 374 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ |
| 375 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ |
| 376 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 377 | | avr-* | avr32-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 378 | | be32-* | be64-* \ |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 379 | | bfin-* | bs2000-* \ |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 380 | | c[123]* | c30-* | [cjt]90-* | c4x-* \ |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 381 | | clipper-* | craynv-* | cydra-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 382 | | d10v-* | d30v-* | dlx-* \ |
| 383 | | elxsi-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 384 | | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 385 | | h8300-* | h8500-* \ |
| 386 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 387 | | hexagon-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 388 | | i*86-* | i860-* | i960-* | ia64-* \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 389 | | ip2k-* | iq2000-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 390 | | le32-* | le64-* \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 391 | | lm32-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 392 | | m32c-* | m32r-* | m32rle-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 393 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 394 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ |
| 395 | | microblaze-* | microblazeel-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 396 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ |
| 397 | | mips16-* \ |
| 398 | | mips64-* | mips64el-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 399 | | mips64octeon-* | mips64octeonel-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 400 | | mips64orion-* | mips64orionel-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 401 | | mips64r5900-* | mips64r5900el-* \ |
| 402 | | mips64vr-* | mips64vrel-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 403 | | mips64vr4100-* | mips64vr4100el-* \ |
| 404 | | mips64vr4300-* | mips64vr4300el-* \ |
| 405 | | mips64vr5000-* | mips64vr5000el-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 406 | | mips64vr5900-* | mips64vr5900el-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 407 | | mipsisa32-* | mipsisa32el-* \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 408 | | mipsisa32r2-* | mipsisa32r2el-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 409 | | mipsisa64-* | mipsisa64el-* \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 410 | | mipsisa64r2-* | mipsisa64r2el-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 411 | | mipsisa64sb1-* | mipsisa64sb1el-* \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 412 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ |
| 413 | | mipstx39-* | mipstx39el-* \ |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 414 | | mmix-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 415 | | mt-* \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 416 | | msp430-* \ |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 417 | | nds32-* | nds32le-* | nds32be-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 418 | | nios-* | nios2-* \ |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 419 | | none-* | np1-* | ns16k-* | ns32k-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 420 | | open8-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 421 | | orion-* \ |
| 422 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 423 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 424 | | pyramid-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 425 | | rl78-* | romp-* | rs6000-* | rx-* \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 426 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 427 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 428 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 429 | | sparclite-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 430 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ |
| 431 | | tahoe-* \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 432 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 433 | | tile*-* \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 434 | | tron-* \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 435 | | ubicom32-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 436 | | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ |
| 437 | | vax-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 438 | | we32k-* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 439 | | x86-* | x86_64-* | xc16x-* | xps100-* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 440 | | xstormy16-* | xtensa*-* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 441 | | ymp-* \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 442 | | z8k-* | z80-*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 443 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 444 | # Recognize the basic CPU types without company name, with glob match. |
| 445 | xtensa*) |
| 446 | basic_machine=$basic_machine-unknown |
| 447 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 448 | # Recognize the various machine names and aliases which stand |
| 449 | # for a CPU type and a company and sometimes even an OS. |
| 450 | 386bsd) |
| 451 | basic_machine=i386-unknown |
| 452 | os=-bsd |
| 453 | ;; |
| 454 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
| 455 | basic_machine=m68000-att |
| 456 | ;; |
| 457 | 3b*) |
| 458 | basic_machine=we32k-att |
| 459 | ;; |
| 460 | a29khif) |
| 461 | basic_machine=a29k-amd |
| 462 | os=-udi |
| 463 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 464 | abacus) |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 465 | basic_machine=abacus-unknown |
| 466 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 467 | adobe68k) |
| 468 | basic_machine=m68010-adobe |
| 469 | os=-scout |
| 470 | ;; |
| 471 | alliant | fx80) |
| 472 | basic_machine=fx80-alliant |
| 473 | ;; |
| 474 | altos | altos3068) |
| 475 | basic_machine=m68k-altos |
| 476 | ;; |
| 477 | am29k) |
| 478 | basic_machine=a29k-none |
| 479 | os=-bsd |
| 480 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 481 | amd64) |
| 482 | basic_machine=x86_64-pc |
| 483 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 484 | amd64-*) |
| 485 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 486 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 487 | amdahl) |
| 488 | basic_machine=580-amdahl |
| 489 | os=-sysv |
| 490 | ;; |
| 491 | amiga | amiga-*) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 492 | basic_machine=m68k-unknown |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 493 | ;; |
| 494 | amigaos | amigados) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 495 | basic_machine=m68k-unknown |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 496 | os=-amigaos |
| 497 | ;; |
| 498 | amigaunix | amix) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 499 | basic_machine=m68k-unknown |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 500 | os=-sysv4 |
| 501 | ;; |
| 502 | apollo68) |
| 503 | basic_machine=m68k-apollo |
| 504 | os=-sysv |
| 505 | ;; |
| 506 | apollo68bsd) |
| 507 | basic_machine=m68k-apollo |
| 508 | os=-bsd |
| 509 | ;; |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 510 | aros) |
| 511 | basic_machine=i386-pc |
| 512 | os=-aros |
| 513 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 514 | aux) |
| 515 | basic_machine=m68k-apple |
| 516 | os=-aux |
| 517 | ;; |
| 518 | balance) |
| 519 | basic_machine=ns32k-sequent |
| 520 | os=-dynix |
| 521 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 522 | blackfin) |
| 523 | basic_machine=bfin-unknown |
| 524 | os=-linux |
| 525 | ;; |
| 526 | blackfin-*) |
| 527 | basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 528 | os=-linux |
| 529 | ;; |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 530 | bluegene*) |
| 531 | basic_machine=powerpc-ibm |
| 532 | os=-cnk |
| 533 | ;; |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 534 | c54x-*) |
| 535 | basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 536 | ;; |
| 537 | c55x-*) |
| 538 | basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 539 | ;; |
| 540 | c6x-*) |
| 541 | basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 542 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 543 | c90) |
| 544 | basic_machine=c90-cray |
| 545 | os=-unicos |
| 546 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 547 | cegcc) |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 548 | basic_machine=arm-unknown |
| 549 | os=-cegcc |
| 550 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 551 | convex-c1) |
| 552 | basic_machine=c1-convex |
| 553 | os=-bsd |
| 554 | ;; |
| 555 | convex-c2) |
| 556 | basic_machine=c2-convex |
| 557 | os=-bsd |
| 558 | ;; |
| 559 | convex-c32) |
| 560 | basic_machine=c32-convex |
| 561 | os=-bsd |
| 562 | ;; |
| 563 | convex-c34) |
| 564 | basic_machine=c34-convex |
| 565 | os=-bsd |
| 566 | ;; |
| 567 | convex-c38) |
| 568 | basic_machine=c38-convex |
| 569 | os=-bsd |
| 570 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 571 | cray | j90) |
| 572 | basic_machine=j90-cray |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 573 | os=-unicos |
| 574 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 575 | craynv) |
| 576 | basic_machine=craynv-cray |
| 577 | os=-unicosmp |
| 578 | ;; |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 579 | cr16 | cr16-*) |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 580 | basic_machine=cr16-unknown |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 581 | os=-elf |
| 582 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 583 | crds | unos) |
| 584 | basic_machine=m68k-crds |
| 585 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 586 | crisv32 | crisv32-* | etraxfs*) |
| 587 | basic_machine=crisv32-axis |
| 588 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 589 | cris | cris-* | etrax*) |
| 590 | basic_machine=cris-axis |
| 591 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 592 | crx) |
| 593 | basic_machine=crx-unknown |
| 594 | os=-elf |
| 595 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 596 | da30 | da30-*) |
| 597 | basic_machine=m68k-da30 |
| 598 | ;; |
| 599 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) |
| 600 | basic_machine=mips-dec |
| 601 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 602 | decsystem10* | dec10*) |
| 603 | basic_machine=pdp10-dec |
| 604 | os=-tops10 |
| 605 | ;; |
| 606 | decsystem20* | dec20*) |
| 607 | basic_machine=pdp10-dec |
| 608 | os=-tops20 |
| 609 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 610 | delta | 3300 | motorola-3300 | motorola-delta \ |
| 611 | | 3300-motorola | delta-motorola) |
| 612 | basic_machine=m68k-motorola |
| 613 | ;; |
| 614 | delta88) |
| 615 | basic_machine=m88k-motorola |
| 616 | os=-sysv3 |
| 617 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 618 | dicos) |
| 619 | basic_machine=i686-pc |
| 620 | os=-dicos |
| 621 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 622 | djgpp) |
| 623 | basic_machine=i586-pc |
| 624 | os=-msdosdjgpp |
| 625 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 626 | dpx20 | dpx20-*) |
| 627 | basic_machine=rs6000-bull |
| 628 | os=-bosx |
| 629 | ;; |
| 630 | dpx2* | dpx2*-bull) |
| 631 | basic_machine=m68k-bull |
| 632 | os=-sysv3 |
| 633 | ;; |
| 634 | ebmon29k) |
| 635 | basic_machine=a29k-amd |
| 636 | os=-ebmon |
| 637 | ;; |
| 638 | elxsi) |
| 639 | basic_machine=elxsi-elxsi |
| 640 | os=-bsd |
| 641 | ;; |
| 642 | encore | umax | mmax) |
| 643 | basic_machine=ns32k-encore |
| 644 | ;; |
| 645 | es1800 | OSE68k | ose68k | ose | OSE) |
| 646 | basic_machine=m68k-ericsson |
| 647 | os=-ose |
| 648 | ;; |
| 649 | fx2800) |
| 650 | basic_machine=i860-alliant |
| 651 | ;; |
| 652 | genix) |
| 653 | basic_machine=ns32k-ns |
| 654 | ;; |
| 655 | gmicro) |
| 656 | basic_machine=tron-gmicro |
| 657 | os=-sysv |
| 658 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 659 | go32) |
| 660 | basic_machine=i386-pc |
| 661 | os=-go32 |
| 662 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 663 | h3050r* | hiux*) |
| 664 | basic_machine=hppa1.1-hitachi |
| 665 | os=-hiuxwe2 |
| 666 | ;; |
| 667 | h8300hms) |
| 668 | basic_machine=h8300-hitachi |
| 669 | os=-hms |
| 670 | ;; |
| 671 | h8300xray) |
| 672 | basic_machine=h8300-hitachi |
| 673 | os=-xray |
| 674 | ;; |
| 675 | h8500hms) |
| 676 | basic_machine=h8500-hitachi |
| 677 | os=-hms |
| 678 | ;; |
| 679 | harris) |
| 680 | basic_machine=m88k-harris |
| 681 | os=-sysv3 |
| 682 | ;; |
| 683 | hp300-*) |
| 684 | basic_machine=m68k-hp |
| 685 | ;; |
| 686 | hp300bsd) |
| 687 | basic_machine=m68k-hp |
| 688 | os=-bsd |
| 689 | ;; |
| 690 | hp300hpux) |
| 691 | basic_machine=m68k-hp |
| 692 | os=-hpux |
| 693 | ;; |
| 694 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
| 695 | basic_machine=hppa1.0-hp |
| 696 | ;; |
| 697 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
| 698 | basic_machine=m68000-hp |
| 699 | ;; |
| 700 | hp9k3[2-9][0-9]) |
| 701 | basic_machine=m68k-hp |
| 702 | ;; |
| 703 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
| 704 | basic_machine=hppa1.0-hp |
| 705 | ;; |
| 706 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
| 707 | basic_machine=hppa1.1-hp |
| 708 | ;; |
| 709 | hp9k78[0-9] | hp78[0-9]) |
| 710 | # FIXME: really hppa2.0-hp |
| 711 | basic_machine=hppa1.1-hp |
| 712 | ;; |
| 713 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) |
| 714 | # FIXME: really hppa2.0-hp |
| 715 | basic_machine=hppa1.1-hp |
| 716 | ;; |
| 717 | hp9k8[0-9][13679] | hp8[0-9][13679]) |
| 718 | basic_machine=hppa1.1-hp |
| 719 | ;; |
| 720 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
| 721 | basic_machine=hppa1.0-hp |
| 722 | ;; |
| 723 | hppa-next) |
| 724 | os=-nextstep3 |
| 725 | ;; |
| 726 | hppaosf) |
| 727 | basic_machine=hppa1.1-hp |
| 728 | os=-osf |
| 729 | ;; |
| 730 | hppro) |
| 731 | basic_machine=hppa1.1-hp |
| 732 | os=-proelf |
| 733 | ;; |
| 734 | i370-ibm* | ibm*) |
| 735 | basic_machine=i370-ibm |
| 736 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 737 | i*86v32) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 738 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
| 739 | os=-sysv32 |
| 740 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 741 | i*86v4*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 742 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
| 743 | os=-sysv4 |
| 744 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 745 | i*86v) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 746 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
| 747 | os=-sysv |
| 748 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 749 | i*86sol2) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 750 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
| 751 | os=-solaris2 |
| 752 | ;; |
| 753 | i386mach) |
| 754 | basic_machine=i386-mach |
| 755 | os=-mach |
| 756 | ;; |
| 757 | i386-vsta | vsta) |
| 758 | basic_machine=i386-unknown |
| 759 | os=-vsta |
| 760 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 761 | iris | iris4d) |
| 762 | basic_machine=mips-sgi |
| 763 | case $os in |
| 764 | -irix*) |
| 765 | ;; |
| 766 | *) |
| 767 | os=-irix4 |
| 768 | ;; |
| 769 | esac |
| 770 | ;; |
| 771 | isi68 | isi) |
| 772 | basic_machine=m68k-isi |
| 773 | os=-sysv |
| 774 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 775 | m68knommu) |
| 776 | basic_machine=m68k-unknown |
| 777 | os=-linux |
| 778 | ;; |
| 779 | m68knommu-*) |
| 780 | basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 781 | os=-linux |
| 782 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 783 | m88k-omron*) |
| 784 | basic_machine=m88k-omron |
| 785 | ;; |
| 786 | magnum | m3230) |
| 787 | basic_machine=mips-mips |
| 788 | os=-sysv |
| 789 | ;; |
| 790 | merlin) |
| 791 | basic_machine=ns32k-utek |
| 792 | os=-sysv |
| 793 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 794 | microblaze*) |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 795 | basic_machine=microblaze-xilinx |
| 796 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 797 | mingw64) |
| 798 | basic_machine=x86_64-pc |
| 799 | os=-mingw64 |
| 800 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 801 | mingw32) |
| 802 | basic_machine=i386-pc |
| 803 | os=-mingw32 |
| 804 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 805 | mingw32ce) |
| 806 | basic_machine=arm-unknown |
| 807 | os=-mingw32ce |
| 808 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 809 | miniframe) |
| 810 | basic_machine=m68000-convergent |
| 811 | ;; |
| 812 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) |
| 813 | basic_machine=m68k-atari |
| 814 | os=-mint |
| 815 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 816 | mips3*-*) |
| 817 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` |
| 818 | ;; |
| 819 | mips3*) |
| 820 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown |
| 821 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 822 | monitor) |
| 823 | basic_machine=m68k-rom68k |
| 824 | os=-coff |
| 825 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 826 | morphos) |
| 827 | basic_machine=powerpc-unknown |
| 828 | os=-morphos |
| 829 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 830 | msdos) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 831 | basic_machine=i386-pc |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 832 | os=-msdos |
| 833 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 834 | ms1-*) |
| 835 | basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` |
| 836 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 837 | msys) |
| 838 | basic_machine=i386-pc |
| 839 | os=-msys |
| 840 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 841 | mvs) |
| 842 | basic_machine=i370-ibm |
| 843 | os=-mvs |
| 844 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 845 | nacl) |
| 846 | basic_machine=le32-unknown |
| 847 | os=-nacl |
| 848 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 849 | ncr3000) |
| 850 | basic_machine=i486-ncr |
| 851 | os=-sysv4 |
| 852 | ;; |
| 853 | netbsd386) |
| 854 | basic_machine=i386-unknown |
| 855 | os=-netbsd |
| 856 | ;; |
| 857 | netwinder) |
| 858 | basic_machine=armv4l-rebel |
| 859 | os=-linux |
| 860 | ;; |
| 861 | news | news700 | news800 | news900) |
| 862 | basic_machine=m68k-sony |
| 863 | os=-newsos |
| 864 | ;; |
| 865 | news1000) |
| 866 | basic_machine=m68030-sony |
| 867 | os=-newsos |
| 868 | ;; |
| 869 | news-3600 | risc-news) |
| 870 | basic_machine=mips-sony |
| 871 | os=-newsos |
| 872 | ;; |
| 873 | necv70) |
| 874 | basic_machine=v70-nec |
| 875 | os=-sysv |
| 876 | ;; |
| 877 | next | m*-next ) |
| 878 | basic_machine=m68k-next |
| 879 | case $os in |
| 880 | -nextstep* ) |
| 881 | ;; |
| 882 | -ns2*) |
| 883 | os=-nextstep2 |
| 884 | ;; |
| 885 | *) |
| 886 | os=-nextstep3 |
| 887 | ;; |
| 888 | esac |
| 889 | ;; |
| 890 | nh3000) |
| 891 | basic_machine=m68k-harris |
| 892 | os=-cxux |
| 893 | ;; |
| 894 | nh[45]000) |
| 895 | basic_machine=m88k-harris |
| 896 | os=-cxux |
| 897 | ;; |
| 898 | nindy960) |
| 899 | basic_machine=i960-intel |
| 900 | os=-nindy |
| 901 | ;; |
| 902 | mon960) |
| 903 | basic_machine=i960-intel |
| 904 | os=-mon960 |
| 905 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 906 | nonstopux) |
| 907 | basic_machine=mips-compaq |
| 908 | os=-nonstopux |
| 909 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 910 | np1) |
| 911 | basic_machine=np1-gould |
| 912 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 913 | neo-tandem) |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 914 | basic_machine=neo-tandem |
| 915 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 916 | nse-tandem) |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 917 | basic_machine=nse-tandem |
| 918 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 919 | nsr-tandem) |
| 920 | basic_machine=nsr-tandem |
Ben Lindstrom | a5a2648 | 2003-03-21 01:05:37 +0000 | [diff] [blame] | 921 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 922 | op50n-* | op60c-*) |
| 923 | basic_machine=hppa1.1-oki |
| 924 | os=-proelf |
| 925 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 926 | openrisc | openrisc-*) |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 927 | basic_machine=or32-unknown |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 928 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 929 | os400) |
| 930 | basic_machine=powerpc-ibm |
| 931 | os=-os400 |
| 932 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 933 | OSE68000 | ose68000) |
| 934 | basic_machine=m68000-ericsson |
| 935 | os=-ose |
| 936 | ;; |
| 937 | os68k) |
| 938 | basic_machine=m68k-none |
| 939 | os=-os68k |
| 940 | ;; |
| 941 | pa-hitachi) |
| 942 | basic_machine=hppa1.1-hitachi |
| 943 | os=-hiuxwe2 |
| 944 | ;; |
| 945 | paragon) |
| 946 | basic_machine=i860-intel |
| 947 | os=-osf |
| 948 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 949 | parisc) |
| 950 | basic_machine=hppa-unknown |
| 951 | os=-linux |
| 952 | ;; |
| 953 | parisc-*) |
| 954 | basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 955 | os=-linux |
| 956 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 957 | pbd) |
| 958 | basic_machine=sparc-tti |
| 959 | ;; |
| 960 | pbb) |
| 961 | basic_machine=m68k-tti |
| 962 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 963 | pc532 | pc532-*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 964 | basic_machine=ns32k-pc532 |
| 965 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 966 | pc98) |
| 967 | basic_machine=i386-pc |
| 968 | ;; |
| 969 | pc98-*) |
| 970 | basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 971 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 972 | pentium | p5 | k5 | k6 | nexgen | viac3) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 973 | basic_machine=i586-pc |
| 974 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 975 | pentiumpro | p6 | 6x86 | athlon | athlon_*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 976 | basic_machine=i686-pc |
| 977 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 978 | pentiumii | pentium2 | pentiumiii | pentium3) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 979 | basic_machine=i686-pc |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 980 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 981 | pentium4) |
| 982 | basic_machine=i786-pc |
| 983 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 984 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 985 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 986 | ;; |
| 987 | pentiumpro-* | p6-* | 6x86-* | athlon-*) |
| 988 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 989 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 990 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 991 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 992 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 993 | pentium4-*) |
| 994 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 995 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 996 | pn) |
| 997 | basic_machine=pn-gould |
| 998 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 999 | power) basic_machine=power-ibm |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1000 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1001 | ppc | ppcbe) basic_machine=powerpc-unknown |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1002 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1003 | ppc-* | ppcbe-*) |
| 1004 | basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1005 | ;; |
| 1006 | ppcle | powerpclittle | ppc-le | powerpc-little) |
| 1007 | basic_machine=powerpcle-unknown |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1008 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1009 | ppcle-* | powerpclittle-*) |
| 1010 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 1011 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1012 | ppc64) basic_machine=powerpc64-unknown |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1013 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1014 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 1015 | ;; |
| 1016 | ppc64le | powerpc64little | ppc64-le | powerpc64-little) |
| 1017 | basic_machine=powerpc64le-unknown |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1018 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1019 | ppc64le-* | powerpc64little-*) |
| 1020 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 1021 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1022 | ps2) |
| 1023 | basic_machine=i386-ibm |
| 1024 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1025 | pw32) |
| 1026 | basic_machine=i586-unknown |
| 1027 | os=-pw32 |
| 1028 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1029 | rdos | rdos64) |
| 1030 | basic_machine=x86_64-pc |
| 1031 | os=-rdos |
| 1032 | ;; |
| 1033 | rdos32) |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1034 | basic_machine=i386-pc |
| 1035 | os=-rdos |
| 1036 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1037 | rom68k) |
| 1038 | basic_machine=m68k-rom68k |
| 1039 | os=-coff |
| 1040 | ;; |
| 1041 | rm[46]00) |
| 1042 | basic_machine=mips-siemens |
| 1043 | ;; |
| 1044 | rtpc | rtpc-*) |
| 1045 | basic_machine=romp-ibm |
| 1046 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1047 | s390 | s390-*) |
| 1048 | basic_machine=s390-ibm |
| 1049 | ;; |
| 1050 | s390x | s390x-*) |
| 1051 | basic_machine=s390x-ibm |
| 1052 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1053 | sa29200) |
| 1054 | basic_machine=a29k-amd |
| 1055 | os=-udi |
| 1056 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1057 | sb1) |
| 1058 | basic_machine=mipsisa64sb1-unknown |
| 1059 | ;; |
| 1060 | sb1el) |
| 1061 | basic_machine=mipsisa64sb1el-unknown |
| 1062 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1063 | sde) |
| 1064 | basic_machine=mipsisa32-sde |
| 1065 | os=-elf |
| 1066 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1067 | sei) |
| 1068 | basic_machine=mips-sei |
| 1069 | os=-seiux |
| 1070 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1071 | sequent) |
| 1072 | basic_machine=i386-sequent |
| 1073 | ;; |
| 1074 | sh) |
| 1075 | basic_machine=sh-hitachi |
| 1076 | os=-hms |
| 1077 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1078 | sh5el) |
| 1079 | basic_machine=sh5le-unknown |
| 1080 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1081 | sh64) |
| 1082 | basic_machine=sh64-unknown |
| 1083 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1084 | sparclite-wrs | simso-wrs) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1085 | basic_machine=sparclite-wrs |
| 1086 | os=-vxworks |
| 1087 | ;; |
| 1088 | sps7) |
| 1089 | basic_machine=m68k-bull |
| 1090 | os=-sysv2 |
| 1091 | ;; |
| 1092 | spur) |
| 1093 | basic_machine=spur-unknown |
| 1094 | ;; |
| 1095 | st2000) |
| 1096 | basic_machine=m68k-tandem |
| 1097 | ;; |
| 1098 | stratus) |
| 1099 | basic_machine=i860-stratus |
| 1100 | os=-sysv4 |
| 1101 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1102 | strongarm-* | thumb-*) |
| 1103 | basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` |
| 1104 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1105 | sun2) |
| 1106 | basic_machine=m68000-sun |
| 1107 | ;; |
| 1108 | sun2os3) |
| 1109 | basic_machine=m68000-sun |
| 1110 | os=-sunos3 |
| 1111 | ;; |
| 1112 | sun2os4) |
| 1113 | basic_machine=m68000-sun |
| 1114 | os=-sunos4 |
| 1115 | ;; |
| 1116 | sun3os3) |
| 1117 | basic_machine=m68k-sun |
| 1118 | os=-sunos3 |
| 1119 | ;; |
| 1120 | sun3os4) |
| 1121 | basic_machine=m68k-sun |
| 1122 | os=-sunos4 |
| 1123 | ;; |
| 1124 | sun4os3) |
| 1125 | basic_machine=sparc-sun |
| 1126 | os=-sunos3 |
| 1127 | ;; |
| 1128 | sun4os4) |
| 1129 | basic_machine=sparc-sun |
| 1130 | os=-sunos4 |
| 1131 | ;; |
| 1132 | sun4sol2) |
| 1133 | basic_machine=sparc-sun |
| 1134 | os=-solaris2 |
| 1135 | ;; |
| 1136 | sun3 | sun3-*) |
| 1137 | basic_machine=m68k-sun |
| 1138 | ;; |
| 1139 | sun4) |
| 1140 | basic_machine=sparc-sun |
| 1141 | ;; |
| 1142 | sun386 | sun386i | roadrunner) |
| 1143 | basic_machine=i386-sun |
| 1144 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1145 | sv1) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1146 | basic_machine=sv1-cray |
| 1147 | os=-unicos |
| 1148 | ;; |
| 1149 | symmetry) |
| 1150 | basic_machine=i386-sequent |
| 1151 | os=-dynix |
| 1152 | ;; |
| 1153 | t3e) |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1154 | basic_machine=alphaev5-cray |
| 1155 | os=-unicos |
| 1156 | ;; |
| 1157 | t90) |
| 1158 | basic_machine=t90-cray |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1159 | os=-unicos |
| 1160 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1161 | tile*) |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1162 | basic_machine=$basic_machine-unknown |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1163 | os=-linux-gnu |
| 1164 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1165 | tx39) |
| 1166 | basic_machine=mipstx39-unknown |
| 1167 | ;; |
| 1168 | tx39el) |
| 1169 | basic_machine=mipstx39el-unknown |
| 1170 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1171 | toad1) |
| 1172 | basic_machine=pdp10-xkl |
| 1173 | os=-tops20 |
| 1174 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1175 | tower | tower-32) |
| 1176 | basic_machine=m68k-ncr |
| 1177 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1178 | tpf) |
| 1179 | basic_machine=s390x-ibm |
| 1180 | os=-tpf |
| 1181 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1182 | udi29k) |
| 1183 | basic_machine=a29k-amd |
| 1184 | os=-udi |
| 1185 | ;; |
| 1186 | ultra3) |
| 1187 | basic_machine=a29k-nyu |
| 1188 | os=-sym1 |
| 1189 | ;; |
| 1190 | v810 | necv810) |
| 1191 | basic_machine=v810-nec |
| 1192 | os=-none |
| 1193 | ;; |
| 1194 | vaxv) |
| 1195 | basic_machine=vax-dec |
| 1196 | os=-sysv |
| 1197 | ;; |
| 1198 | vms) |
| 1199 | basic_machine=vax-dec |
| 1200 | os=-vms |
| 1201 | ;; |
| 1202 | vpp*|vx|vx-*) |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1203 | basic_machine=f301-fujitsu |
| 1204 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1205 | vxworks960) |
| 1206 | basic_machine=i960-wrs |
| 1207 | os=-vxworks |
| 1208 | ;; |
| 1209 | vxworks68) |
| 1210 | basic_machine=m68k-wrs |
| 1211 | os=-vxworks |
| 1212 | ;; |
| 1213 | vxworks29k) |
| 1214 | basic_machine=a29k-wrs |
| 1215 | os=-vxworks |
| 1216 | ;; |
| 1217 | w65*) |
| 1218 | basic_machine=w65-wdc |
| 1219 | os=-none |
| 1220 | ;; |
| 1221 | w89k-*) |
| 1222 | basic_machine=hppa1.1-winbond |
| 1223 | os=-proelf |
| 1224 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1225 | xbox) |
| 1226 | basic_machine=i686-pc |
| 1227 | os=-mingw32 |
| 1228 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1229 | xps | xps100) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1230 | basic_machine=xps100-honeywell |
| 1231 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1232 | xscale-* | xscalee[bl]-*) |
| 1233 | basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` |
| 1234 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1235 | ymp) |
| 1236 | basic_machine=ymp-cray |
| 1237 | os=-unicos |
| 1238 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1239 | z8k-*-coff) |
| 1240 | basic_machine=z8k-unknown |
| 1241 | os=-sim |
| 1242 | ;; |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 1243 | z80-*-coff) |
| 1244 | basic_machine=z80-unknown |
| 1245 | os=-sim |
| 1246 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1247 | none) |
| 1248 | basic_machine=none-none |
| 1249 | os=-none |
| 1250 | ;; |
| 1251 | |
| 1252 | # Here we handle the default manufacturer of certain CPU types. It is in |
| 1253 | # some cases the only manufacturer, in others, it is the most popular. |
| 1254 | w89k) |
| 1255 | basic_machine=hppa1.1-winbond |
| 1256 | ;; |
| 1257 | op50n) |
| 1258 | basic_machine=hppa1.1-oki |
| 1259 | ;; |
| 1260 | op60c) |
| 1261 | basic_machine=hppa1.1-oki |
| 1262 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1263 | romp) |
| 1264 | basic_machine=romp-ibm |
| 1265 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1266 | mmix) |
| 1267 | basic_machine=mmix-knuth |
| 1268 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1269 | rs6000) |
| 1270 | basic_machine=rs6000-ibm |
| 1271 | ;; |
| 1272 | vax) |
| 1273 | basic_machine=vax-dec |
| 1274 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1275 | pdp10) |
| 1276 | # there are many clones, so DEC is not a safe bet |
| 1277 | basic_machine=pdp10-unknown |
| 1278 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1279 | pdp11) |
| 1280 | basic_machine=pdp11-dec |
| 1281 | ;; |
| 1282 | we32k) |
| 1283 | basic_machine=we32k-att |
| 1284 | ;; |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 1285 | sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1286 | basic_machine=sh-unknown |
| 1287 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1288 | sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1289 | basic_machine=sparc-sun |
| 1290 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1291 | cydra) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1292 | basic_machine=cydra-cydrome |
| 1293 | ;; |
| 1294 | orion) |
| 1295 | basic_machine=orion-highlevel |
| 1296 | ;; |
| 1297 | orion105) |
| 1298 | basic_machine=clipper-highlevel |
| 1299 | ;; |
| 1300 | mac | mpw | mac-mpw) |
| 1301 | basic_machine=m68k-apple |
| 1302 | ;; |
| 1303 | pmac | pmac-mpw) |
| 1304 | basic_machine=powerpc-apple |
| 1305 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1306 | *-unknown) |
| 1307 | # Make sure to match an already-canonicalized machine name. |
| 1308 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1309 | *) |
| 1310 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
| 1311 | exit 1 |
| 1312 | ;; |
| 1313 | esac |
| 1314 | |
| 1315 | # Here we canonicalize certain aliases for manufacturers. |
| 1316 | case $basic_machine in |
| 1317 | *-digital*) |
| 1318 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` |
| 1319 | ;; |
| 1320 | *-commodore*) |
| 1321 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` |
| 1322 | ;; |
| 1323 | *) |
| 1324 | ;; |
| 1325 | esac |
| 1326 | |
| 1327 | # Decode manufacturer-specific aliases for certain operating systems. |
| 1328 | |
| 1329 | if [ x"$os" != x"" ] |
| 1330 | then |
| 1331 | case $os in |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1332 | # First match some system type aliases |
| 1333 | # that might get confused with valid system types. |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1334 | # -solaris* is a basic system type, with this one exception. |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1335 | -auroraux) |
| 1336 | os=-auroraux |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 1337 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1338 | -solaris1 | -solaris1.*) |
| 1339 | os=`echo $os | sed -e 's|solaris1|sunos4|'` |
| 1340 | ;; |
| 1341 | -solaris) |
| 1342 | os=-solaris2 |
| 1343 | ;; |
| 1344 | -svr4*) |
| 1345 | os=-sysv4 |
| 1346 | ;; |
| 1347 | -unixware*) |
| 1348 | os=-sysv4.2uw |
| 1349 | ;; |
| 1350 | -gnu/linux*) |
| 1351 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` |
| 1352 | ;; |
| 1353 | # First accept the basic system types. |
| 1354 | # The portable systems comes first. |
| 1355 | # Each alternative MUST END IN A *, to match a version number. |
| 1356 | # -sysv* is not here because it comes later, after sysvr4. |
| 1357 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 1358 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ |
| 1359 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ |
| 1360 | | -sym* | -kopensolaris* \ |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1361 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 1362 | | -aos* | -aros* \ |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1363 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ |
| 1364 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1365 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1366 | | -bitrig* | -openbsd* | -solidbsd* \ |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1367 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ |
| 1368 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1369 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ |
| 1370 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1371 | | -chorusos* | -chorusrdb* | -cegcc* \ |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1372 | | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
| 1373 | | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ |
| 1374 | | -linux-newlib* | -linux-musl* | -linux-uclibc* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1375 | | -uxpv* | -beos* | -mpeix* | -udk* \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1376 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1377 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1378 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
| 1379 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1380 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1381 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 1382 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1383 | # Remember, each alternative MUST END IN *, to match a version number. |
| 1384 | ;; |
| 1385 | -qnx*) |
| 1386 | case $basic_machine in |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1387 | x86-* | i*86-*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1388 | ;; |
| 1389 | *) |
| 1390 | os=-nto$os |
| 1391 | ;; |
| 1392 | esac |
| 1393 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1394 | -nto-qnx*) |
| 1395 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1396 | -nto*) |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1397 | os=`echo $os | sed -e 's|nto|nto-qnx|'` |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1398 | ;; |
| 1399 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1400 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1401 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) |
| 1402 | ;; |
| 1403 | -mac*) |
| 1404 | os=`echo $os | sed -e 's|mac|macos|'` |
| 1405 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1406 | -linux-dietlibc) |
| 1407 | os=-linux-dietlibc |
| 1408 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1409 | -linux*) |
| 1410 | os=`echo $os | sed -e 's|linux|linux-gnu|'` |
| 1411 | ;; |
| 1412 | -sunos5*) |
| 1413 | os=`echo $os | sed -e 's|sunos5|solaris2|'` |
| 1414 | ;; |
| 1415 | -sunos6*) |
| 1416 | os=`echo $os | sed -e 's|sunos6|solaris3|'` |
| 1417 | ;; |
| 1418 | -opened*) |
| 1419 | os=-openedition |
| 1420 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1421 | -os400*) |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1422 | os=-os400 |
| 1423 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1424 | -wince*) |
| 1425 | os=-wince |
| 1426 | ;; |
| 1427 | -osfrose*) |
| 1428 | os=-osfrose |
| 1429 | ;; |
| 1430 | -osf*) |
| 1431 | os=-osf |
| 1432 | ;; |
| 1433 | -utek*) |
| 1434 | os=-bsd |
| 1435 | ;; |
| 1436 | -dynix*) |
| 1437 | os=-bsd |
| 1438 | ;; |
| 1439 | -acis*) |
| 1440 | os=-aos |
| 1441 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1442 | -atheos*) |
| 1443 | os=-atheos |
| 1444 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1445 | -syllable*) |
| 1446 | os=-syllable |
| 1447 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1448 | -386bsd) |
| 1449 | os=-bsd |
| 1450 | ;; |
| 1451 | -ctix* | -uts*) |
| 1452 | os=-sysv |
| 1453 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1454 | -nova*) |
| 1455 | os=-rtmk-nova |
| 1456 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1457 | -ns2 ) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1458 | os=-nextstep2 |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1459 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1460 | -nsk*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1461 | os=-nsk |
| 1462 | ;; |
| 1463 | # Preserve the version number of sinix5. |
| 1464 | -sinix5.*) |
| 1465 | os=`echo $os | sed -e 's|sinix|sysv|'` |
| 1466 | ;; |
| 1467 | -sinix*) |
| 1468 | os=-sysv4 |
| 1469 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1470 | -tpf*) |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1471 | os=-tpf |
| 1472 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1473 | -triton*) |
| 1474 | os=-sysv3 |
| 1475 | ;; |
| 1476 | -oss*) |
| 1477 | os=-sysv3 |
| 1478 | ;; |
| 1479 | -svr4) |
| 1480 | os=-sysv4 |
| 1481 | ;; |
| 1482 | -svr3) |
| 1483 | os=-sysv3 |
| 1484 | ;; |
| 1485 | -sysvr4) |
| 1486 | os=-sysv4 |
| 1487 | ;; |
| 1488 | # This must come after -sysvr4. |
| 1489 | -sysv*) |
| 1490 | ;; |
| 1491 | -ose*) |
| 1492 | os=-ose |
| 1493 | ;; |
| 1494 | -es1800*) |
| 1495 | os=-ose |
| 1496 | ;; |
| 1497 | -xenix) |
| 1498 | os=-xenix |
| 1499 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1500 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
| 1501 | os=-mint |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1502 | ;; |
Damien Miller | 752e4e6 | 2004-04-21 12:29:13 +1000 | [diff] [blame] | 1503 | -aros*) |
| 1504 | os=-aros |
| 1505 | ;; |
| 1506 | -kaos*) |
| 1507 | os=-kaos |
| 1508 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1509 | -zvmoe) |
| 1510 | os=-zvmoe |
| 1511 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1512 | -dicos*) |
| 1513 | os=-dicos |
| 1514 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1515 | -nacl*) |
| 1516 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1517 | -none) |
| 1518 | ;; |
| 1519 | *) |
| 1520 | # Get rid of the `-' at the beginning of $os. |
| 1521 | os=`echo $os | sed 's/[^-]*-//'` |
| 1522 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 |
| 1523 | exit 1 |
| 1524 | ;; |
| 1525 | esac |
| 1526 | else |
| 1527 | |
| 1528 | # Here we handle the default operating systems that come with various machines. |
| 1529 | # The value should be what the vendor currently ships out the door with their |
| 1530 | # machine or put another way, the most popular os provided with the machine. |
| 1531 | |
| 1532 | # Note that if you're going to try to match "-MANUFACTURER" here (say, |
| 1533 | # "-sun"), then you have to tell the case statement up towards the top |
| 1534 | # that MANUFACTURER isn't an operating system. Otherwise, code above |
| 1535 | # will signal an error saying that MANUFACTURER isn't an operating |
| 1536 | # system, and we'll never get to this point. |
| 1537 | |
| 1538 | case $basic_machine in |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1539 | score-*) |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1540 | os=-elf |
| 1541 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1542 | spu-*) |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1543 | os=-elf |
| 1544 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1545 | *-acorn) |
| 1546 | os=-riscix1.2 |
| 1547 | ;; |
| 1548 | arm*-rebel) |
| 1549 | os=-linux |
| 1550 | ;; |
| 1551 | arm*-semi) |
| 1552 | os=-aout |
| 1553 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1554 | c4x-* | tic4x-*) |
| 1555 | os=-coff |
| 1556 | ;; |
| 1557 | hexagon-*) |
| 1558 | os=-elf |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1559 | ;; |
Tim Rice | d069c48 | 2011-01-26 12:32:12 -0800 | [diff] [blame] | 1560 | tic54x-*) |
| 1561 | os=-coff |
| 1562 | ;; |
| 1563 | tic55x-*) |
| 1564 | os=-coff |
| 1565 | ;; |
| 1566 | tic6x-*) |
| 1567 | os=-coff |
| 1568 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1569 | # This must come before the *-dec entry. |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1570 | pdp10-*) |
| 1571 | os=-tops20 |
| 1572 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1573 | pdp11-*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1574 | os=-none |
| 1575 | ;; |
| 1576 | *-dec | vax-*) |
| 1577 | os=-ultrix4.2 |
| 1578 | ;; |
| 1579 | m68*-apollo) |
| 1580 | os=-domain |
| 1581 | ;; |
| 1582 | i386-sun) |
| 1583 | os=-sunos4.0.2 |
| 1584 | ;; |
| 1585 | m68000-sun) |
| 1586 | os=-sunos3 |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1587 | ;; |
| 1588 | m68*-cisco) |
| 1589 | os=-aout |
| 1590 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1591 | mep-*) |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1592 | os=-elf |
| 1593 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1594 | mips*-cisco) |
| 1595 | os=-elf |
| 1596 | ;; |
| 1597 | mips*-*) |
| 1598 | os=-elf |
| 1599 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1600 | or32-*) |
| 1601 | os=-coff |
| 1602 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1603 | *-tti) # must be before sparc entry or we get the wrong os. |
| 1604 | os=-sysv3 |
| 1605 | ;; |
| 1606 | sparc-* | *-sun) |
| 1607 | os=-sunos4.1.1 |
| 1608 | ;; |
| 1609 | *-be) |
| 1610 | os=-beos |
| 1611 | ;; |
Darren Tucker | c570ff7 | 2008-09-06 18:20:57 +1000 | [diff] [blame] | 1612 | *-haiku) |
| 1613 | os=-haiku |
| 1614 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1615 | *-ibm) |
| 1616 | os=-aix |
| 1617 | ;; |
Damien Miller | bc68f24 | 2013-04-18 11:26:25 +1000 | [diff] [blame^] | 1618 | *-knuth) |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1619 | os=-mmixware |
| 1620 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1621 | *-wec) |
| 1622 | os=-proelf |
| 1623 | ;; |
| 1624 | *-winbond) |
| 1625 | os=-proelf |
| 1626 | ;; |
| 1627 | *-oki) |
| 1628 | os=-proelf |
| 1629 | ;; |
| 1630 | *-hp) |
| 1631 | os=-hpux |
| 1632 | ;; |
| 1633 | *-hitachi) |
| 1634 | os=-hiux |
| 1635 | ;; |
| 1636 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
| 1637 | os=-sysv |
| 1638 | ;; |
| 1639 | *-cbm) |
| 1640 | os=-amigaos |
| 1641 | ;; |
| 1642 | *-dg) |
| 1643 | os=-dgux |
| 1644 | ;; |
| 1645 | *-dolphin) |
| 1646 | os=-sysv3 |
| 1647 | ;; |
| 1648 | m68k-ccur) |
| 1649 | os=-rtu |
| 1650 | ;; |
| 1651 | m88k-omron*) |
| 1652 | os=-luna |
| 1653 | ;; |
| 1654 | *-next ) |
| 1655 | os=-nextstep |
| 1656 | ;; |
| 1657 | *-sequent) |
| 1658 | os=-ptx |
| 1659 | ;; |
| 1660 | *-crds) |
| 1661 | os=-unos |
| 1662 | ;; |
| 1663 | *-ns) |
| 1664 | os=-genix |
| 1665 | ;; |
| 1666 | i370-*) |
| 1667 | os=-mvs |
| 1668 | ;; |
| 1669 | *-next) |
| 1670 | os=-nextstep3 |
| 1671 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1672 | *-gould) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1673 | os=-sysv |
| 1674 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1675 | *-highlevel) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1676 | os=-bsd |
| 1677 | ;; |
| 1678 | *-encore) |
| 1679 | os=-bsd |
| 1680 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1681 | *-sgi) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1682 | os=-irix |
| 1683 | ;; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1684 | *-siemens) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1685 | os=-sysv4 |
| 1686 | ;; |
| 1687 | *-masscomp) |
| 1688 | os=-rtu |
| 1689 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1690 | f30[01]-fujitsu | f700-fujitsu) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1691 | os=-uxpv |
| 1692 | ;; |
| 1693 | *-rom68k) |
| 1694 | os=-coff |
| 1695 | ;; |
| 1696 | *-*bug) |
| 1697 | os=-coff |
| 1698 | ;; |
| 1699 | *-apple) |
| 1700 | os=-macos |
| 1701 | ;; |
| 1702 | *-atari*) |
| 1703 | os=-mint |
| 1704 | ;; |
| 1705 | *) |
| 1706 | os=-none |
| 1707 | ;; |
| 1708 | esac |
| 1709 | fi |
| 1710 | |
| 1711 | # Here we handle the case where we know the os, and the CPU type, but not the |
| 1712 | # manufacturer. We pick the logical manufacturer. |
| 1713 | vendor=unknown |
| 1714 | case $basic_machine in |
| 1715 | *-unknown) |
| 1716 | case $os in |
| 1717 | -riscix*) |
| 1718 | vendor=acorn |
| 1719 | ;; |
| 1720 | -sunos*) |
| 1721 | vendor=sun |
| 1722 | ;; |
Tim Rice | c5b0cb3 | 2010-03-01 15:57:42 -0800 | [diff] [blame] | 1723 | -cnk*|-aix*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1724 | vendor=ibm |
| 1725 | ;; |
| 1726 | -beos*) |
| 1727 | vendor=be |
| 1728 | ;; |
| 1729 | -hpux*) |
| 1730 | vendor=hp |
| 1731 | ;; |
| 1732 | -mpeix*) |
| 1733 | vendor=hp |
| 1734 | ;; |
| 1735 | -hiux*) |
| 1736 | vendor=hitachi |
| 1737 | ;; |
| 1738 | -unos*) |
| 1739 | vendor=crds |
| 1740 | ;; |
| 1741 | -dgux*) |
| 1742 | vendor=dg |
| 1743 | ;; |
| 1744 | -luna*) |
| 1745 | vendor=omron |
| 1746 | ;; |
| 1747 | -genix*) |
| 1748 | vendor=ns |
| 1749 | ;; |
| 1750 | -mvs* | -opened*) |
| 1751 | vendor=ibm |
| 1752 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1753 | -os400*) |
| 1754 | vendor=ibm |
| 1755 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1756 | -ptx*) |
| 1757 | vendor=sequent |
| 1758 | ;; |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1759 | -tpf*) |
| 1760 | vendor=ibm |
| 1761 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1762 | -vxsim* | -vxworks* | -windiss*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1763 | vendor=wrs |
| 1764 | ;; |
| 1765 | -aux*) |
| 1766 | vendor=apple |
| 1767 | ;; |
| 1768 | -hms*) |
| 1769 | vendor=hitachi |
| 1770 | ;; |
| 1771 | -mpw* | -macos*) |
| 1772 | vendor=apple |
| 1773 | ;; |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1774 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1775 | vendor=atari |
| 1776 | ;; |
Damien Miller | a7609f5 | 2002-07-25 14:40:22 +1000 | [diff] [blame] | 1777 | -vos*) |
| 1778 | vendor=stratus |
| 1779 | ;; |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1780 | esac |
| 1781 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` |
| 1782 | ;; |
| 1783 | esac |
| 1784 | |
| 1785 | echo $basic_machine$os |
Tim Rice | 5f70758 | 2005-06-01 19:57:45 -0700 | [diff] [blame] | 1786 | exit |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1787 | |
| 1788 | # Local variables: |
| 1789 | # eval: (add-hook 'write-file-hooks 'time-stamp) |
Damien Miller | 5bf5f2c | 2001-05-06 10:54:15 +1000 | [diff] [blame] | 1790 | # time-stamp-start: "timestamp='" |
Damien Miller | b405d61 | 2000-06-12 23:01:02 +1000 | [diff] [blame] | 1791 | # time-stamp-format: "%:y-%02m-%02d" |
| 1792 | # time-stamp-end: "'" |
| 1793 | # End: |