1a253d6aeSmrg#! /bin/sh 2a253d6aeSmrg# Configuration validation subroutine script. 310f94802Smrg# Copyright 1992-2024 Free Software Foundation, Inc. 4a253d6aeSmrg 5b41a30aaSmrg# shellcheck disable=SC2006,SC2268 # see below for rationale 6b41a30aaSmrg 710f94802Smrgtimestamp='2024-01-01' 8a253d6aeSmrg 957ee1794Smrg# This file is free software; you can redistribute it and/or modify it 1057ee1794Smrg# under the terms of the GNU General Public License as published by 1110f94802Smrg# the Free Software Foundation, either version 3 of the License, or 12a253d6aeSmrg# (at your option) any later version. 13a253d6aeSmrg# 1457ee1794Smrg# This program is distributed in the hope that it will be useful, but 1557ee1794Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1657ee1794Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1757ee1794Smrg# General Public License for more details. 18a253d6aeSmrg# 19a253d6aeSmrg# You should have received a copy of the GNU General Public License 20b41a30aaSmrg# along with this program; if not, see <https://www.gnu.org/licenses/>. 21a253d6aeSmrg# 22a253d6aeSmrg# As a special exception to the GNU General Public License, if you 23a253d6aeSmrg# distribute this file as part of a program that contains a 24a253d6aeSmrg# configuration script generated by Autoconf, you may include it under 2557ee1794Smrg# the same distribution terms that you use for the rest of that 2657ee1794Smrg# program. This Exception is an additional permission under section 7 2757ee1794Smrg# of the GNU General Public License, version 3 ("GPLv3"). 28a253d6aeSmrg 29a253d6aeSmrg 30b41a30aaSmrg# Please send patches to <config-patches@gnu.org>. 31a253d6aeSmrg# 32a253d6aeSmrg# Configuration subroutine to validate and canonicalize a configuration type. 33a253d6aeSmrg# Supply the specified configuration type as an argument. 34a253d6aeSmrg# If it is invalid, we print an error message on stderr and exit with code 1. 35a253d6aeSmrg# Otherwise, we print the canonical config type on stdout and succeed. 36a253d6aeSmrg 3725b89263Smrg# You can get the latest version of this script from: 38b41a30aaSmrg# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub 3925b89263Smrg 40a253d6aeSmrg# This file is supposed to be the same for all GNU packages 41a253d6aeSmrg# and recognize all the CPU types, system types and aliases 42a253d6aeSmrg# that are meaningful with *any* GNU software. 43a253d6aeSmrg# Each package is responsible for reporting which valid configurations 44a253d6aeSmrg# it does not support. The user should be able to distinguish 45a253d6aeSmrg# a failure to support a valid configuration from a meaningless 46a253d6aeSmrg# configuration. 47a253d6aeSmrg 48a253d6aeSmrg# The goal of this file is to map all the various variations of a given 49a253d6aeSmrg# machine specification into a single specification in the form: 50a253d6aeSmrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 51a253d6aeSmrg# or in some cases, the newer four-part form: 52a253d6aeSmrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 53a253d6aeSmrg# It is wrong to echo any other type of specification. 54a253d6aeSmrg 55b41a30aaSmrg# The "shellcheck disable" line above the timestamp inhibits complaints 56b41a30aaSmrg# about features and limitations of the classic Bourne shell that were 57b41a30aaSmrg# superseded or lifted in POSIX. However, this script identifies a wide 58b41a30aaSmrg# variety of pre-POSIX systems that do not have POSIX shells at all, and 59b41a30aaSmrg# even some reasonably current systems (Solaris 10 as case-in-point) still 60b41a30aaSmrg# have a pre-POSIX /bin/sh. 61b41a30aaSmrg 62a253d6aeSmrgme=`echo "$0" | sed -e 's,.*/,,'` 63a253d6aeSmrg 64a253d6aeSmrgusage="\ 65b41a30aaSmrgUsage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS 66a253d6aeSmrg 67a253d6aeSmrgCanonicalize a configuration name. 68a253d6aeSmrg 69b41a30aaSmrgOptions: 70a253d6aeSmrg -h, --help print this help, then exit 71a253d6aeSmrg -t, --time-stamp print date of last modification, then exit 72a253d6aeSmrg -v, --version print version number, then exit 73a253d6aeSmrg 74a253d6aeSmrgReport bugs and patches to <config-patches@gnu.org>." 75a253d6aeSmrg 76a253d6aeSmrgversion="\ 77a253d6aeSmrgGNU config.sub ($timestamp) 78a253d6aeSmrg 7910f94802SmrgCopyright 1992-2024 Free Software Foundation, Inc. 80a253d6aeSmrg 81a253d6aeSmrgThis is free software; see the source for copying conditions. There is NO 82a253d6aeSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 83a253d6aeSmrg 84a253d6aeSmrghelp=" 8510f94802SmrgTry '$me --help' for more information." 86a253d6aeSmrg 87a253d6aeSmrg# Parse command line 88a253d6aeSmrgwhile test $# -gt 0 ; do 89a253d6aeSmrg case $1 in 90a253d6aeSmrg --time-stamp | --time* | -t ) 91a253d6aeSmrg echo "$timestamp" ; exit ;; 92a253d6aeSmrg --version | -v ) 93a253d6aeSmrg echo "$version" ; exit ;; 94a253d6aeSmrg --help | --h* | -h ) 95a253d6aeSmrg echo "$usage"; exit ;; 96a253d6aeSmrg -- ) # Stop option processing 97a253d6aeSmrg shift; break ;; 98a253d6aeSmrg - ) # Use stdin as input. 99a253d6aeSmrg break ;; 100a253d6aeSmrg -* ) 101b41a30aaSmrg echo "$me: invalid option $1$help" >&2 102a253d6aeSmrg exit 1 ;; 103a253d6aeSmrg 104a253d6aeSmrg *local*) 105a253d6aeSmrg # First pass through any local machine types. 106b41a30aaSmrg echo "$1" 107a253d6aeSmrg exit ;; 108a253d6aeSmrg 109a253d6aeSmrg * ) 110a253d6aeSmrg break ;; 111a253d6aeSmrg esac 112a253d6aeSmrgdone 113a253d6aeSmrg 114a253d6aeSmrgcase $# in 115a253d6aeSmrg 0) echo "$me: missing argument$help" >&2 116a253d6aeSmrg exit 1;; 117a253d6aeSmrg 1) ;; 118a253d6aeSmrg *) echo "$me: too many arguments$help" >&2 119a253d6aeSmrg exit 1;; 120a253d6aeSmrgesac 121a253d6aeSmrg 122b41a30aaSmrg# Split fields of configuration type 123b41a30aaSmrg# shellcheck disable=SC2162 124b41a30aaSmrgsaved_IFS=$IFS 125b41a30aaSmrgIFS="-" read field1 field2 field3 field4 <<EOF 126b41a30aaSmrg$1 127b41a30aaSmrgEOF 128b41a30aaSmrgIFS=$saved_IFS 129a253d6aeSmrg 130b41a30aaSmrg# Separate into logical components for further validation 131b41a30aaSmrgcase $1 in 132b41a30aaSmrg *-*-*-*-*) 13310f94802Smrg echo "Invalid configuration '$1': more than four components" >&2 134b41a30aaSmrg exit 1 135a253d6aeSmrg ;; 136b41a30aaSmrg *-*-*-*) 137b41a30aaSmrg basic_machine=$field1-$field2 138b41a30aaSmrg basic_os=$field3-$field4 139a253d6aeSmrg ;; 140b41a30aaSmrg *-*-*) 141b41a30aaSmrg # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two 142b41a30aaSmrg # parts 143b41a30aaSmrg maybe_os=$field2-$field3 144b41a30aaSmrg case $maybe_os in 145b41a30aaSmrg nto-qnx* | linux-* | uclinux-uclibc* \ 146b41a30aaSmrg | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ 147b41a30aaSmrg | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ 14810f94802Smrg | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ 14910f94802Smrg | windows-* ) 150b41a30aaSmrg basic_machine=$field1 151b41a30aaSmrg basic_os=$maybe_os 152b41a30aaSmrg ;; 153b41a30aaSmrg android-linux) 154b41a30aaSmrg basic_machine=$field1-unknown 155b41a30aaSmrg basic_os=linux-android 156b41a30aaSmrg ;; 157b41a30aaSmrg *) 158b41a30aaSmrg basic_machine=$field1-$field2 159b41a30aaSmrg basic_os=$field3 160b41a30aaSmrg ;; 161b41a30aaSmrg esac 162a253d6aeSmrg ;; 163b41a30aaSmrg *-*) 164b41a30aaSmrg # A lone config we happen to match not fitting any pattern 165b41a30aaSmrg case $field1-$field2 in 166b41a30aaSmrg decstation-3100) 167b41a30aaSmrg basic_machine=mips-dec 168b41a30aaSmrg basic_os= 169b41a30aaSmrg ;; 170b41a30aaSmrg *-*) 171b41a30aaSmrg # Second component is usually, but not always the OS 172b41a30aaSmrg case $field2 in 173b41a30aaSmrg # Prevent following clause from handling this valid os 174b41a30aaSmrg sun*os*) 175b41a30aaSmrg basic_machine=$field1 176b41a30aaSmrg basic_os=$field2 177b41a30aaSmrg ;; 178b41a30aaSmrg zephyr*) 179b41a30aaSmrg basic_machine=$field1-unknown 180b41a30aaSmrg basic_os=$field2 181b41a30aaSmrg ;; 182b41a30aaSmrg # Manufacturers 183b41a30aaSmrg dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ 184b41a30aaSmrg | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ 185b41a30aaSmrg | unicom* | ibm* | next | hp | isi* | apollo | altos* \ 186b41a30aaSmrg | convergent* | ncr* | news | 32* | 3600* | 3100* \ 187b41a30aaSmrg | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ 188b41a30aaSmrg | ultra | tti* | harris | dolphin | highlevel | gould \ 189b41a30aaSmrg | cbm | ns | masscomp | apple | axis | knuth | cray \ 190b41a30aaSmrg | microblaze* | sim | cisco \ 191b41a30aaSmrg | oki | wec | wrs | winbond) 192b41a30aaSmrg basic_machine=$field1-$field2 193b41a30aaSmrg basic_os= 194b41a30aaSmrg ;; 195b41a30aaSmrg *) 196b41a30aaSmrg basic_machine=$field1 197b41a30aaSmrg basic_os=$field2 198b41a30aaSmrg ;; 199b41a30aaSmrg esac 200b41a30aaSmrg ;; 201b41a30aaSmrg esac 202a253d6aeSmrg ;; 203b41a30aaSmrg *) 204b41a30aaSmrg # Convert single-component short-hands not valid as part of 205b41a30aaSmrg # multi-component configurations. 206b41a30aaSmrg case $field1 in 207b41a30aaSmrg 386bsd) 208b41a30aaSmrg basic_machine=i386-pc 209b41a30aaSmrg basic_os=bsd 210b41a30aaSmrg ;; 211b41a30aaSmrg a29khif) 212b41a30aaSmrg basic_machine=a29k-amd 213b41a30aaSmrg basic_os=udi 214b41a30aaSmrg ;; 215b41a30aaSmrg adobe68k) 216b41a30aaSmrg basic_machine=m68010-adobe 217b41a30aaSmrg basic_os=scout 218b41a30aaSmrg ;; 219b41a30aaSmrg alliant) 220b41a30aaSmrg basic_machine=fx80-alliant 221b41a30aaSmrg basic_os= 222b41a30aaSmrg ;; 223b41a30aaSmrg altos | altos3068) 224b41a30aaSmrg basic_machine=m68k-altos 225b41a30aaSmrg basic_os= 226b41a30aaSmrg ;; 227b41a30aaSmrg am29k) 228b41a30aaSmrg basic_machine=a29k-none 229b41a30aaSmrg basic_os=bsd 230b41a30aaSmrg ;; 231b41a30aaSmrg amdahl) 232b41a30aaSmrg basic_machine=580-amdahl 233b41a30aaSmrg basic_os=sysv 234b41a30aaSmrg ;; 235b41a30aaSmrg amiga) 236b41a30aaSmrg basic_machine=m68k-unknown 237b41a30aaSmrg basic_os= 238b41a30aaSmrg ;; 239b41a30aaSmrg amigaos | amigados) 240b41a30aaSmrg basic_machine=m68k-unknown 241b41a30aaSmrg basic_os=amigaos 242b41a30aaSmrg ;; 243b41a30aaSmrg amigaunix | amix) 244b41a30aaSmrg basic_machine=m68k-unknown 245b41a30aaSmrg basic_os=sysv4 246b41a30aaSmrg ;; 247b41a30aaSmrg apollo68) 248b41a30aaSmrg basic_machine=m68k-apollo 249b41a30aaSmrg basic_os=sysv 250b41a30aaSmrg ;; 251b41a30aaSmrg apollo68bsd) 252b41a30aaSmrg basic_machine=m68k-apollo 253b41a30aaSmrg basic_os=bsd 254b41a30aaSmrg ;; 255b41a30aaSmrg aros) 256b41a30aaSmrg basic_machine=i386-pc 257b41a30aaSmrg basic_os=aros 258b41a30aaSmrg ;; 259b41a30aaSmrg aux) 260b41a30aaSmrg basic_machine=m68k-apple 261b41a30aaSmrg basic_os=aux 262b41a30aaSmrg ;; 263b41a30aaSmrg balance) 264b41a30aaSmrg basic_machine=ns32k-sequent 265b41a30aaSmrg basic_os=dynix 266b41a30aaSmrg ;; 267b41a30aaSmrg blackfin) 268b41a30aaSmrg basic_machine=bfin-unknown 269b41a30aaSmrg basic_os=linux 270b41a30aaSmrg ;; 271b41a30aaSmrg cegcc) 272b41a30aaSmrg basic_machine=arm-unknown 273b41a30aaSmrg basic_os=cegcc 274b41a30aaSmrg ;; 275b41a30aaSmrg convex-c1) 276b41a30aaSmrg basic_machine=c1-convex 277b41a30aaSmrg basic_os=bsd 278b41a30aaSmrg ;; 279b41a30aaSmrg convex-c2) 280b41a30aaSmrg basic_machine=c2-convex 281b41a30aaSmrg basic_os=bsd 282b41a30aaSmrg ;; 283b41a30aaSmrg convex-c32) 284b41a30aaSmrg basic_machine=c32-convex 285b41a30aaSmrg basic_os=bsd 286b41a30aaSmrg ;; 287b41a30aaSmrg convex-c34) 288b41a30aaSmrg basic_machine=c34-convex 289b41a30aaSmrg basic_os=bsd 290b41a30aaSmrg ;; 291b41a30aaSmrg convex-c38) 292b41a30aaSmrg basic_machine=c38-convex 293b41a30aaSmrg basic_os=bsd 294b41a30aaSmrg ;; 295b41a30aaSmrg cray) 296b41a30aaSmrg basic_machine=j90-cray 297b41a30aaSmrg basic_os=unicos 298b41a30aaSmrg ;; 299b41a30aaSmrg crds | unos) 300b41a30aaSmrg basic_machine=m68k-crds 301b41a30aaSmrg basic_os= 302b41a30aaSmrg ;; 303b41a30aaSmrg da30) 304b41a30aaSmrg basic_machine=m68k-da30 305b41a30aaSmrg basic_os= 306b41a30aaSmrg ;; 307b41a30aaSmrg decstation | pmax | pmin | dec3100 | decstatn) 308b41a30aaSmrg basic_machine=mips-dec 309b41a30aaSmrg basic_os= 310b41a30aaSmrg ;; 311b41a30aaSmrg delta88) 312b41a30aaSmrg basic_machine=m88k-motorola 313b41a30aaSmrg basic_os=sysv3 314b41a30aaSmrg ;; 315b41a30aaSmrg dicos) 316b41a30aaSmrg basic_machine=i686-pc 317b41a30aaSmrg basic_os=dicos 318b41a30aaSmrg ;; 319b41a30aaSmrg djgpp) 320b41a30aaSmrg basic_machine=i586-pc 321b41a30aaSmrg basic_os=msdosdjgpp 322b41a30aaSmrg ;; 323b41a30aaSmrg ebmon29k) 324b41a30aaSmrg basic_machine=a29k-amd 325b41a30aaSmrg basic_os=ebmon 326b41a30aaSmrg ;; 327b41a30aaSmrg es1800 | OSE68k | ose68k | ose | OSE) 328b41a30aaSmrg basic_machine=m68k-ericsson 329b41a30aaSmrg basic_os=ose 330b41a30aaSmrg ;; 331b41a30aaSmrg gmicro) 332b41a30aaSmrg basic_machine=tron-gmicro 333b41a30aaSmrg basic_os=sysv 334b41a30aaSmrg ;; 335b41a30aaSmrg go32) 336b41a30aaSmrg basic_machine=i386-pc 337b41a30aaSmrg basic_os=go32 338b41a30aaSmrg ;; 339b41a30aaSmrg h8300hms) 340b41a30aaSmrg basic_machine=h8300-hitachi 341b41a30aaSmrg basic_os=hms 342b41a30aaSmrg ;; 343b41a30aaSmrg h8300xray) 344b41a30aaSmrg basic_machine=h8300-hitachi 345b41a30aaSmrg basic_os=xray 346b41a30aaSmrg ;; 347b41a30aaSmrg h8500hms) 348b41a30aaSmrg basic_machine=h8500-hitachi 349b41a30aaSmrg basic_os=hms 350b41a30aaSmrg ;; 351b41a30aaSmrg harris) 352b41a30aaSmrg basic_machine=m88k-harris 353b41a30aaSmrg basic_os=sysv3 354b41a30aaSmrg ;; 355b41a30aaSmrg hp300 | hp300hpux) 356b41a30aaSmrg basic_machine=m68k-hp 357b41a30aaSmrg basic_os=hpux 358b41a30aaSmrg ;; 359b41a30aaSmrg hp300bsd) 360b41a30aaSmrg basic_machine=m68k-hp 361b41a30aaSmrg basic_os=bsd 362b41a30aaSmrg ;; 363b41a30aaSmrg hppaosf) 364b41a30aaSmrg basic_machine=hppa1.1-hp 365b41a30aaSmrg basic_os=osf 366b41a30aaSmrg ;; 367b41a30aaSmrg hppro) 368b41a30aaSmrg basic_machine=hppa1.1-hp 369b41a30aaSmrg basic_os=proelf 370b41a30aaSmrg ;; 371b41a30aaSmrg i386mach) 372b41a30aaSmrg basic_machine=i386-mach 373b41a30aaSmrg basic_os=mach 374b41a30aaSmrg ;; 375b41a30aaSmrg isi68 | isi) 376b41a30aaSmrg basic_machine=m68k-isi 377b41a30aaSmrg basic_os=sysv 378b41a30aaSmrg ;; 379b41a30aaSmrg m68knommu) 380b41a30aaSmrg basic_machine=m68k-unknown 381b41a30aaSmrg basic_os=linux 382b41a30aaSmrg ;; 383b41a30aaSmrg magnum | m3230) 384b41a30aaSmrg basic_machine=mips-mips 385b41a30aaSmrg basic_os=sysv 386b41a30aaSmrg ;; 387b41a30aaSmrg merlin) 388b41a30aaSmrg basic_machine=ns32k-utek 389b41a30aaSmrg basic_os=sysv 390b41a30aaSmrg ;; 391b41a30aaSmrg mingw64) 392b41a30aaSmrg basic_machine=x86_64-pc 393b41a30aaSmrg basic_os=mingw64 394b41a30aaSmrg ;; 395b41a30aaSmrg mingw32) 396b41a30aaSmrg basic_machine=i686-pc 397b41a30aaSmrg basic_os=mingw32 398b41a30aaSmrg ;; 399b41a30aaSmrg mingw32ce) 400b41a30aaSmrg basic_machine=arm-unknown 401b41a30aaSmrg basic_os=mingw32ce 402b41a30aaSmrg ;; 403b41a30aaSmrg monitor) 404b41a30aaSmrg basic_machine=m68k-rom68k 405b41a30aaSmrg basic_os=coff 406b41a30aaSmrg ;; 407b41a30aaSmrg morphos) 408b41a30aaSmrg basic_machine=powerpc-unknown 409b41a30aaSmrg basic_os=morphos 410b41a30aaSmrg ;; 411b41a30aaSmrg moxiebox) 412b41a30aaSmrg basic_machine=moxie-unknown 413b41a30aaSmrg basic_os=moxiebox 414b41a30aaSmrg ;; 415b41a30aaSmrg msdos) 416b41a30aaSmrg basic_machine=i386-pc 417b41a30aaSmrg basic_os=msdos 418b41a30aaSmrg ;; 419b41a30aaSmrg msys) 420b41a30aaSmrg basic_machine=i686-pc 421b41a30aaSmrg basic_os=msys 422b41a30aaSmrg ;; 423b41a30aaSmrg mvs) 424b41a30aaSmrg basic_machine=i370-ibm 425b41a30aaSmrg basic_os=mvs 426b41a30aaSmrg ;; 427b41a30aaSmrg nacl) 428b41a30aaSmrg basic_machine=le32-unknown 429b41a30aaSmrg basic_os=nacl 430b41a30aaSmrg ;; 431b41a30aaSmrg ncr3000) 432b41a30aaSmrg basic_machine=i486-ncr 433b41a30aaSmrg basic_os=sysv4 434b41a30aaSmrg ;; 435b41a30aaSmrg netbsd386) 436b41a30aaSmrg basic_machine=i386-pc 437b41a30aaSmrg basic_os=netbsd 438b41a30aaSmrg ;; 439b41a30aaSmrg netwinder) 440b41a30aaSmrg basic_machine=armv4l-rebel 441b41a30aaSmrg basic_os=linux 442b41a30aaSmrg ;; 443b41a30aaSmrg news | news700 | news800 | news900) 444b41a30aaSmrg basic_machine=m68k-sony 445b41a30aaSmrg basic_os=newsos 446b41a30aaSmrg ;; 447b41a30aaSmrg news1000) 448b41a30aaSmrg basic_machine=m68030-sony 449b41a30aaSmrg basic_os=newsos 450b41a30aaSmrg ;; 451b41a30aaSmrg necv70) 452b41a30aaSmrg basic_machine=v70-nec 453b41a30aaSmrg basic_os=sysv 454b41a30aaSmrg ;; 455b41a30aaSmrg nh3000) 456b41a30aaSmrg basic_machine=m68k-harris 457b41a30aaSmrg basic_os=cxux 458b41a30aaSmrg ;; 459b41a30aaSmrg nh[45]000) 460b41a30aaSmrg basic_machine=m88k-harris 461b41a30aaSmrg basic_os=cxux 462b41a30aaSmrg ;; 463b41a30aaSmrg nindy960) 464b41a30aaSmrg basic_machine=i960-intel 465b41a30aaSmrg basic_os=nindy 466b41a30aaSmrg ;; 467b41a30aaSmrg mon960) 468b41a30aaSmrg basic_machine=i960-intel 469b41a30aaSmrg basic_os=mon960 470b41a30aaSmrg ;; 471b41a30aaSmrg nonstopux) 472b41a30aaSmrg basic_machine=mips-compaq 473b41a30aaSmrg basic_os=nonstopux 474b41a30aaSmrg ;; 475b41a30aaSmrg os400) 476b41a30aaSmrg basic_machine=powerpc-ibm 477b41a30aaSmrg basic_os=os400 478b41a30aaSmrg ;; 479b41a30aaSmrg OSE68000 | ose68000) 480b41a30aaSmrg basic_machine=m68000-ericsson 481b41a30aaSmrg basic_os=ose 482b41a30aaSmrg ;; 483b41a30aaSmrg os68k) 484b41a30aaSmrg basic_machine=m68k-none 485b41a30aaSmrg basic_os=os68k 486b41a30aaSmrg ;; 487b41a30aaSmrg paragon) 488b41a30aaSmrg basic_machine=i860-intel 489b41a30aaSmrg basic_os=osf 490b41a30aaSmrg ;; 491b41a30aaSmrg parisc) 492b41a30aaSmrg basic_machine=hppa-unknown 493b41a30aaSmrg basic_os=linux 494b41a30aaSmrg ;; 495b41a30aaSmrg psp) 496b41a30aaSmrg basic_machine=mipsallegrexel-sony 497b41a30aaSmrg basic_os=psp 498b41a30aaSmrg ;; 499b41a30aaSmrg pw32) 500b41a30aaSmrg basic_machine=i586-unknown 501b41a30aaSmrg basic_os=pw32 502b41a30aaSmrg ;; 503b41a30aaSmrg rdos | rdos64) 504b41a30aaSmrg basic_machine=x86_64-pc 505b41a30aaSmrg basic_os=rdos 506b41a30aaSmrg ;; 507b41a30aaSmrg rdos32) 508b41a30aaSmrg basic_machine=i386-pc 509b41a30aaSmrg basic_os=rdos 510b41a30aaSmrg ;; 511b41a30aaSmrg rom68k) 512b41a30aaSmrg basic_machine=m68k-rom68k 513b41a30aaSmrg basic_os=coff 514b41a30aaSmrg ;; 515b41a30aaSmrg sa29200) 516b41a30aaSmrg basic_machine=a29k-amd 517b41a30aaSmrg basic_os=udi 518b41a30aaSmrg ;; 519b41a30aaSmrg sei) 520b41a30aaSmrg basic_machine=mips-sei 521b41a30aaSmrg basic_os=seiux 522b41a30aaSmrg ;; 523b41a30aaSmrg sequent) 524b41a30aaSmrg basic_machine=i386-sequent 525b41a30aaSmrg basic_os= 526b41a30aaSmrg ;; 527b41a30aaSmrg sps7) 528b41a30aaSmrg basic_machine=m68k-bull 529b41a30aaSmrg basic_os=sysv2 530b41a30aaSmrg ;; 531b41a30aaSmrg st2000) 532b41a30aaSmrg basic_machine=m68k-tandem 533b41a30aaSmrg basic_os= 534b41a30aaSmrg ;; 535b41a30aaSmrg stratus) 536b41a30aaSmrg basic_machine=i860-stratus 537b41a30aaSmrg basic_os=sysv4 538b41a30aaSmrg ;; 539b41a30aaSmrg sun2) 540b41a30aaSmrg basic_machine=m68000-sun 541b41a30aaSmrg basic_os= 542b41a30aaSmrg ;; 543b41a30aaSmrg sun2os3) 544b41a30aaSmrg basic_machine=m68000-sun 545b41a30aaSmrg basic_os=sunos3 546b41a30aaSmrg ;; 547b41a30aaSmrg sun2os4) 548b41a30aaSmrg basic_machine=m68000-sun 549b41a30aaSmrg basic_os=sunos4 550b41a30aaSmrg ;; 551b41a30aaSmrg sun3) 552b41a30aaSmrg basic_machine=m68k-sun 553b41a30aaSmrg basic_os= 554b41a30aaSmrg ;; 555b41a30aaSmrg sun3os3) 556b41a30aaSmrg basic_machine=m68k-sun 557b41a30aaSmrg basic_os=sunos3 558b41a30aaSmrg ;; 559b41a30aaSmrg sun3os4) 560b41a30aaSmrg basic_machine=m68k-sun 561b41a30aaSmrg basic_os=sunos4 562b41a30aaSmrg ;; 563b41a30aaSmrg sun4) 564b41a30aaSmrg basic_machine=sparc-sun 565b41a30aaSmrg basic_os= 566b41a30aaSmrg ;; 567b41a30aaSmrg sun4os3) 568b41a30aaSmrg basic_machine=sparc-sun 569b41a30aaSmrg basic_os=sunos3 570b41a30aaSmrg ;; 571b41a30aaSmrg sun4os4) 572b41a30aaSmrg basic_machine=sparc-sun 573b41a30aaSmrg basic_os=sunos4 574b41a30aaSmrg ;; 575b41a30aaSmrg sun4sol2) 576b41a30aaSmrg basic_machine=sparc-sun 577b41a30aaSmrg basic_os=solaris2 578b41a30aaSmrg ;; 579b41a30aaSmrg sun386 | sun386i | roadrunner) 580b41a30aaSmrg basic_machine=i386-sun 581b41a30aaSmrg basic_os= 582b41a30aaSmrg ;; 583b41a30aaSmrg sv1) 584b41a30aaSmrg basic_machine=sv1-cray 585b41a30aaSmrg basic_os=unicos 586b41a30aaSmrg ;; 587b41a30aaSmrg symmetry) 588b41a30aaSmrg basic_machine=i386-sequent 589b41a30aaSmrg basic_os=dynix 590b41a30aaSmrg ;; 591b41a30aaSmrg t3e) 592b41a30aaSmrg basic_machine=alphaev5-cray 593b41a30aaSmrg basic_os=unicos 594b41a30aaSmrg ;; 595b41a30aaSmrg t90) 596b41a30aaSmrg basic_machine=t90-cray 597b41a30aaSmrg basic_os=unicos 598b41a30aaSmrg ;; 599b41a30aaSmrg toad1) 600b41a30aaSmrg basic_machine=pdp10-xkl 601b41a30aaSmrg basic_os=tops20 602b41a30aaSmrg ;; 603b41a30aaSmrg tpf) 604b41a30aaSmrg basic_machine=s390x-ibm 605b41a30aaSmrg basic_os=tpf 606b41a30aaSmrg ;; 607b41a30aaSmrg udi29k) 608b41a30aaSmrg basic_machine=a29k-amd 609b41a30aaSmrg basic_os=udi 610b41a30aaSmrg ;; 611b41a30aaSmrg ultra3) 612b41a30aaSmrg basic_machine=a29k-nyu 613b41a30aaSmrg basic_os=sym1 614b41a30aaSmrg ;; 615b41a30aaSmrg v810 | necv810) 616b41a30aaSmrg basic_machine=v810-nec 617b41a30aaSmrg basic_os=none 618b41a30aaSmrg ;; 619b41a30aaSmrg vaxv) 620b41a30aaSmrg basic_machine=vax-dec 621b41a30aaSmrg basic_os=sysv 622b41a30aaSmrg ;; 623b41a30aaSmrg vms) 624b41a30aaSmrg basic_machine=vax-dec 625b41a30aaSmrg basic_os=vms 626b41a30aaSmrg ;; 627b41a30aaSmrg vsta) 628b41a30aaSmrg basic_machine=i386-pc 629b41a30aaSmrg basic_os=vsta 630b41a30aaSmrg ;; 631b41a30aaSmrg vxworks960) 632b41a30aaSmrg basic_machine=i960-wrs 633b41a30aaSmrg basic_os=vxworks 634b41a30aaSmrg ;; 635b41a30aaSmrg vxworks68) 636b41a30aaSmrg basic_machine=m68k-wrs 637b41a30aaSmrg basic_os=vxworks 638b41a30aaSmrg ;; 639b41a30aaSmrg vxworks29k) 640b41a30aaSmrg basic_machine=a29k-wrs 641b41a30aaSmrg basic_os=vxworks 642b41a30aaSmrg ;; 643b41a30aaSmrg xbox) 644b41a30aaSmrg basic_machine=i686-pc 645b41a30aaSmrg basic_os=mingw32 646b41a30aaSmrg ;; 647b41a30aaSmrg ymp) 648b41a30aaSmrg basic_machine=ymp-cray 649b41a30aaSmrg basic_os=unicos 650b41a30aaSmrg ;; 651b41a30aaSmrg *) 652b41a30aaSmrg basic_machine=$1 653b41a30aaSmrg basic_os= 654b41a30aaSmrg ;; 655b41a30aaSmrg esac 656a253d6aeSmrg ;; 657a253d6aeSmrgesac 658a253d6aeSmrg 659b41a30aaSmrg# Decode 1-component or ad-hoc basic machines 660a253d6aeSmrgcase $basic_machine in 661b41a30aaSmrg # Here we handle the default manufacturer of certain CPU types. It is in 662b41a30aaSmrg # some cases the only manufacturer, in others, it is the most popular. 663b41a30aaSmrg w89k) 664b41a30aaSmrg cpu=hppa1.1 665b41a30aaSmrg vendor=winbond 666a253d6aeSmrg ;; 667b41a30aaSmrg op50n) 668b41a30aaSmrg cpu=hppa1.1 669b41a30aaSmrg vendor=oki 67057ee1794Smrg ;; 671b41a30aaSmrg op60c) 672b41a30aaSmrg cpu=hppa1.1 673b41a30aaSmrg vendor=oki 67457ee1794Smrg ;; 675b41a30aaSmrg ibm*) 676b41a30aaSmrg cpu=i370 677b41a30aaSmrg vendor=ibm 67857ee1794Smrg ;; 679b41a30aaSmrg orion105) 680b41a30aaSmrg cpu=clipper 681b41a30aaSmrg vendor=highlevel 68257ee1794Smrg ;; 683b41a30aaSmrg mac | mpw | mac-mpw) 684b41a30aaSmrg cpu=m68k 685b41a30aaSmrg vendor=apple 686a253d6aeSmrg ;; 687b41a30aaSmrg pmac | pmac-mpw) 688b41a30aaSmrg cpu=powerpc 689b41a30aaSmrg vendor=apple 690a253d6aeSmrg ;; 691b41a30aaSmrg 692a253d6aeSmrg # Recognize the various machine names and aliases which stand 693a253d6aeSmrg # for a CPU type and a company and sometimes even an OS. 694a253d6aeSmrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 695b41a30aaSmrg cpu=m68000 696b41a30aaSmrg vendor=att 697a253d6aeSmrg ;; 698a253d6aeSmrg 3b*) 699b41a30aaSmrg cpu=we32k 700b41a30aaSmrg vendor=att 701ea133fd7Smrg ;; 70225b89263Smrg bluegene*) 703b41a30aaSmrg cpu=powerpc 704b41a30aaSmrg vendor=ibm 705b41a30aaSmrg basic_os=cnk 706a253d6aeSmrg ;; 707a253d6aeSmrg decsystem10* | dec10*) 708b41a30aaSmrg cpu=pdp10 709b41a30aaSmrg vendor=dec 710b41a30aaSmrg basic_os=tops10 711a253d6aeSmrg ;; 712a253d6aeSmrg decsystem20* | dec20*) 713b41a30aaSmrg cpu=pdp10 714b41a30aaSmrg vendor=dec 715b41a30aaSmrg basic_os=tops20 716a253d6aeSmrg ;; 717a253d6aeSmrg delta | 3300 | motorola-3300 | motorola-delta \ 718a253d6aeSmrg | 3300-motorola | delta-motorola) 719b41a30aaSmrg cpu=m68k 720b41a30aaSmrg vendor=motorola 721a253d6aeSmrg ;; 722b41a30aaSmrg dpx2*) 723b41a30aaSmrg cpu=m68k 724b41a30aaSmrg vendor=bull 725b41a30aaSmrg basic_os=sysv3 726a253d6aeSmrg ;; 727a253d6aeSmrg encore | umax | mmax) 728b41a30aaSmrg cpu=ns32k 729b41a30aaSmrg vendor=encore 730a253d6aeSmrg ;; 731b41a30aaSmrg elxsi) 732b41a30aaSmrg cpu=elxsi 733b41a30aaSmrg vendor=elxsi 734b41a30aaSmrg basic_os=${basic_os:-bsd} 735a253d6aeSmrg ;; 736a253d6aeSmrg fx2800) 737b41a30aaSmrg cpu=i860 738b41a30aaSmrg vendor=alliant 739a253d6aeSmrg ;; 740a253d6aeSmrg genix) 741b41a30aaSmrg cpu=ns32k 742b41a30aaSmrg vendor=ns 743a253d6aeSmrg ;; 744a253d6aeSmrg h3050r* | hiux*) 745b41a30aaSmrg cpu=hppa1.1 746b41a30aaSmrg vendor=hitachi 747b41a30aaSmrg basic_os=hiuxwe2 748a253d6aeSmrg ;; 749a253d6aeSmrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 750b41a30aaSmrg cpu=hppa1.0 751b41a30aaSmrg vendor=hp 752a253d6aeSmrg ;; 753a253d6aeSmrg hp9k2[0-9][0-9] | hp9k31[0-9]) 754b41a30aaSmrg cpu=m68000 755b41a30aaSmrg vendor=hp 756a253d6aeSmrg ;; 757a253d6aeSmrg hp9k3[2-9][0-9]) 758b41a30aaSmrg cpu=m68k 759b41a30aaSmrg vendor=hp 760a253d6aeSmrg ;; 761a253d6aeSmrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 762b41a30aaSmrg cpu=hppa1.0 763b41a30aaSmrg vendor=hp 764a253d6aeSmrg ;; 765a253d6aeSmrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 766b41a30aaSmrg cpu=hppa1.1 767b41a30aaSmrg vendor=hp 768a253d6aeSmrg ;; 769a253d6aeSmrg hp9k78[0-9] | hp78[0-9]) 770a253d6aeSmrg # FIXME: really hppa2.0-hp 771b41a30aaSmrg cpu=hppa1.1 772b41a30aaSmrg vendor=hp 773a253d6aeSmrg ;; 774a253d6aeSmrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 775a253d6aeSmrg # FIXME: really hppa2.0-hp 776b41a30aaSmrg cpu=hppa1.1 777b41a30aaSmrg vendor=hp 778a253d6aeSmrg ;; 779a253d6aeSmrg hp9k8[0-9][13679] | hp8[0-9][13679]) 780b41a30aaSmrg cpu=hppa1.1 781b41a30aaSmrg vendor=hp 782a253d6aeSmrg ;; 783a253d6aeSmrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 784b41a30aaSmrg cpu=hppa1.0 785b41a30aaSmrg vendor=hp 786a253d6aeSmrg ;; 787a253d6aeSmrg i*86v32) 788b41a30aaSmrg cpu=`echo "$1" | sed -e 's/86.*/86/'` 789b41a30aaSmrg vendor=pc 790b41a30aaSmrg basic_os=sysv32 791a253d6aeSmrg ;; 792a253d6aeSmrg i*86v4*) 793b41a30aaSmrg cpu=`echo "$1" | sed -e 's/86.*/86/'` 794b41a30aaSmrg vendor=pc 795b41a30aaSmrg basic_os=sysv4 796a253d6aeSmrg ;; 797a253d6aeSmrg i*86v) 798b41a30aaSmrg cpu=`echo "$1" | sed -e 's/86.*/86/'` 799b41a30aaSmrg vendor=pc 800b41a30aaSmrg basic_os=sysv 801a253d6aeSmrg ;; 802a253d6aeSmrg i*86sol2) 803b41a30aaSmrg cpu=`echo "$1" | sed -e 's/86.*/86/'` 804b41a30aaSmrg vendor=pc 805b41a30aaSmrg basic_os=solaris2 806a253d6aeSmrg ;; 807b41a30aaSmrg j90 | j90-cray) 808b41a30aaSmrg cpu=j90 809b41a30aaSmrg vendor=cray 810b41a30aaSmrg basic_os=${basic_os:-unicos} 811a253d6aeSmrg ;; 812a253d6aeSmrg iris | iris4d) 813b41a30aaSmrg cpu=mips 814b41a30aaSmrg vendor=sgi 815b41a30aaSmrg case $basic_os in 816b41a30aaSmrg irix*) 817a253d6aeSmrg ;; 818a253d6aeSmrg *) 819b41a30aaSmrg basic_os=irix4 820a253d6aeSmrg ;; 821a253d6aeSmrg esac 822a253d6aeSmrg ;; 823a253d6aeSmrg miniframe) 824b41a30aaSmrg cpu=m68000 825b41a30aaSmrg vendor=convergent 826a253d6aeSmrg ;; 827b41a30aaSmrg *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) 828b41a30aaSmrg cpu=m68k 829b41a30aaSmrg vendor=atari 830b41a30aaSmrg basic_os=mint 831a253d6aeSmrg ;; 832a253d6aeSmrg news-3600 | risc-news) 833b41a30aaSmrg cpu=mips 834b41a30aaSmrg vendor=sony 835b41a30aaSmrg basic_os=newsos 836b41a30aaSmrg ;; 837b41a30aaSmrg next | m*-next) 838b41a30aaSmrg cpu=m68k 839b41a30aaSmrg vendor=next 840b41a30aaSmrg case $basic_os in 841b41a30aaSmrg openstep*) 842b41a30aaSmrg ;; 843b41a30aaSmrg nextstep*) 844a253d6aeSmrg ;; 845b41a30aaSmrg ns2*) 846b41a30aaSmrg basic_os=nextstep2 847a253d6aeSmrg ;; 848a253d6aeSmrg *) 849b41a30aaSmrg basic_os=nextstep3 850a253d6aeSmrg ;; 851a253d6aeSmrg esac 852a253d6aeSmrg ;; 853a253d6aeSmrg np1) 854b41a30aaSmrg cpu=np1 855b41a30aaSmrg vendor=gould 856a253d6aeSmrg ;; 857a253d6aeSmrg op50n-* | op60c-*) 858b41a30aaSmrg cpu=hppa1.1 859b41a30aaSmrg vendor=oki 860b41a30aaSmrg basic_os=proelf 861a253d6aeSmrg ;; 862a253d6aeSmrg pa-hitachi) 863b41a30aaSmrg cpu=hppa1.1 864b41a30aaSmrg vendor=hitachi 865b41a30aaSmrg basic_os=hiuxwe2 866ea133fd7Smrg ;; 867a253d6aeSmrg pbd) 868b41a30aaSmrg cpu=sparc 869b41a30aaSmrg vendor=tti 870a253d6aeSmrg ;; 871a253d6aeSmrg pbb) 872b41a30aaSmrg cpu=m68k 873b41a30aaSmrg vendor=tti 874ea133fd7Smrg ;; 875b41a30aaSmrg pc532) 876b41a30aaSmrg cpu=ns32k 877b41a30aaSmrg vendor=pc532 878a253d6aeSmrg ;; 879a253d6aeSmrg pn) 880b41a30aaSmrg cpu=pn 881b41a30aaSmrg vendor=gould 882a253d6aeSmrg ;; 883b41a30aaSmrg power) 884b41a30aaSmrg cpu=power 885b41a30aaSmrg vendor=ibm 886a253d6aeSmrg ;; 887a253d6aeSmrg ps2) 888b41a30aaSmrg cpu=i386 889b41a30aaSmrg vendor=ibm 890a253d6aeSmrg ;; 891a253d6aeSmrg rm[46]00) 892b41a30aaSmrg cpu=mips 893b41a30aaSmrg vendor=siemens 894a253d6aeSmrg ;; 895a253d6aeSmrg rtpc | rtpc-*) 896b41a30aaSmrg cpu=romp 897b41a30aaSmrg vendor=ibm 898a253d6aeSmrg ;; 899b41a30aaSmrg sde) 900b41a30aaSmrg cpu=mipsisa32 901b41a30aaSmrg vendor=sde 902b41a30aaSmrg basic_os=${basic_os:-elf} 903a253d6aeSmrg ;; 904b41a30aaSmrg simso-wrs) 905b41a30aaSmrg cpu=sparclite 906b41a30aaSmrg vendor=wrs 907b41a30aaSmrg basic_os=vxworks 908a253d6aeSmrg ;; 909b41a30aaSmrg tower | tower-32) 910b41a30aaSmrg cpu=m68k 911b41a30aaSmrg vendor=ncr 912ea133fd7Smrg ;; 913b41a30aaSmrg vpp*|vx|vx-*) 914b41a30aaSmrg cpu=f301 915b41a30aaSmrg vendor=fujitsu 916a253d6aeSmrg ;; 917b41a30aaSmrg w65) 918b41a30aaSmrg cpu=w65 919b41a30aaSmrg vendor=wdc 920a253d6aeSmrg ;; 921b41a30aaSmrg w89k-*) 922b41a30aaSmrg cpu=hppa1.1 923b41a30aaSmrg vendor=winbond 924b41a30aaSmrg basic_os=proelf 925a253d6aeSmrg ;; 926b41a30aaSmrg none) 927b41a30aaSmrg cpu=none 928b41a30aaSmrg vendor=none 929ea133fd7Smrg ;; 930b41a30aaSmrg leon|leon[3-9]) 931b41a30aaSmrg cpu=sparc 932b41a30aaSmrg vendor=$basic_machine 933a253d6aeSmrg ;; 934b41a30aaSmrg leon-*|leon[3-9]-*) 935b41a30aaSmrg cpu=sparc 936b41a30aaSmrg vendor=`echo "$basic_machine" | sed 's/-.*//'` 937a253d6aeSmrg ;; 938b41a30aaSmrg 939b41a30aaSmrg *-*) 940b41a30aaSmrg # shellcheck disable=SC2162 941b41a30aaSmrg saved_IFS=$IFS 942b41a30aaSmrg IFS="-" read cpu vendor <<EOF 943b41a30aaSmrg$basic_machine 944b41a30aaSmrgEOF 945b41a30aaSmrg IFS=$saved_IFS 946a253d6aeSmrg ;; 94710f94802Smrg # We use 'pc' rather than 'unknown' 948b41a30aaSmrg # because (1) that's what they normally are, and 949b41a30aaSmrg # (2) the word "unknown" tends to confuse beginning users. 950b41a30aaSmrg i*86 | x86_64) 951b41a30aaSmrg cpu=$basic_machine 952b41a30aaSmrg vendor=pc 953a253d6aeSmrg ;; 954b41a30aaSmrg # These rules are duplicated from below for sake of the special case above; 955b41a30aaSmrg # i.e. things that normalized to x86 arches should also default to "pc" 956b41a30aaSmrg pc98) 957b41a30aaSmrg cpu=i386 958b41a30aaSmrg vendor=pc 959a253d6aeSmrg ;; 960b41a30aaSmrg x64 | amd64) 961b41a30aaSmrg cpu=x86_64 962b41a30aaSmrg vendor=pc 963a253d6aeSmrg ;; 964b41a30aaSmrg # Recognize the basic CPU types without company name. 965b41a30aaSmrg *) 966b41a30aaSmrg cpu=$basic_machine 967b41a30aaSmrg vendor=unknown 96857ee1794Smrg ;; 969b41a30aaSmrgesac 970b41a30aaSmrg 971b41a30aaSmrgunset -v basic_machine 972b41a30aaSmrg 973b41a30aaSmrg# Decode basic machines in the full and proper CPU-Company form. 974b41a30aaSmrgcase $cpu-$vendor in 975b41a30aaSmrg # Here we handle the default manufacturer of certain CPU types in canonical form. It is in 976b41a30aaSmrg # some cases the only manufacturer, in others, it is the most popular. 977b41a30aaSmrg craynv-unknown) 978b41a30aaSmrg vendor=cray 979b41a30aaSmrg basic_os=${basic_os:-unicosmp} 980a253d6aeSmrg ;; 981b41a30aaSmrg c90-unknown | c90-cray) 982b41a30aaSmrg vendor=cray 983b41a30aaSmrg basic_os=${Basic_os:-unicos} 984a253d6aeSmrg ;; 985b41a30aaSmrg fx80-unknown) 986b41a30aaSmrg vendor=alliant 987a253d6aeSmrg ;; 988b41a30aaSmrg romp-unknown) 989b41a30aaSmrg vendor=ibm 990a253d6aeSmrg ;; 991b41a30aaSmrg mmix-unknown) 992b41a30aaSmrg vendor=knuth 993a253d6aeSmrg ;; 994b41a30aaSmrg microblaze-unknown | microblazeel-unknown) 995b41a30aaSmrg vendor=xilinx 996a253d6aeSmrg ;; 997b41a30aaSmrg rs6000-unknown) 998b41a30aaSmrg vendor=ibm 999a253d6aeSmrg ;; 1000b41a30aaSmrg vax-unknown) 1001b41a30aaSmrg vendor=dec 1002a253d6aeSmrg ;; 1003b41a30aaSmrg pdp11-unknown) 1004b41a30aaSmrg vendor=dec 1005a253d6aeSmrg ;; 1006b41a30aaSmrg we32k-unknown) 1007b41a30aaSmrg vendor=att 1008a253d6aeSmrg ;; 1009b41a30aaSmrg cydra-unknown) 1010b41a30aaSmrg vendor=cydrome 1011a253d6aeSmrg ;; 1012b41a30aaSmrg i370-ibm*) 1013b41a30aaSmrg vendor=ibm 1014a253d6aeSmrg ;; 1015b41a30aaSmrg orion-unknown) 1016b41a30aaSmrg vendor=highlevel 1017a253d6aeSmrg ;; 1018b41a30aaSmrg xps-unknown | xps100-unknown) 1019b41a30aaSmrg cpu=xps100 1020b41a30aaSmrg vendor=honeywell 1021a253d6aeSmrg ;; 1022b41a30aaSmrg 1023b41a30aaSmrg # Here we normalize CPU types with a missing or matching vendor 102410f94802Smrg armh-unknown | armh-alt) 102510f94802Smrg cpu=armv7l 102610f94802Smrg vendor=alt 102710f94802Smrg basic_os=${basic_os:-linux-gnueabihf} 102810f94802Smrg ;; 1029b41a30aaSmrg dpx20-unknown | dpx20-bull) 1030b41a30aaSmrg cpu=rs6000 1031b41a30aaSmrg vendor=bull 1032b41a30aaSmrg basic_os=${basic_os:-bosx} 1033a253d6aeSmrg ;; 1034b41a30aaSmrg 1035b41a30aaSmrg # Here we normalize CPU types irrespective of the vendor 1036b41a30aaSmrg amd64-*) 1037b41a30aaSmrg cpu=x86_64 1038ea133fd7Smrg ;; 1039b41a30aaSmrg blackfin-*) 1040b41a30aaSmrg cpu=bfin 1041b41a30aaSmrg basic_os=linux 1042a253d6aeSmrg ;; 1043b41a30aaSmrg c54x-*) 1044b41a30aaSmrg cpu=tic54x 1045a253d6aeSmrg ;; 1046b41a30aaSmrg c55x-*) 1047b41a30aaSmrg cpu=tic55x 1048a253d6aeSmrg ;; 1049b41a30aaSmrg c6x-*) 1050b41a30aaSmrg cpu=tic6x 1051a253d6aeSmrg ;; 1052b41a30aaSmrg e500v[12]-*) 1053b41a30aaSmrg cpu=powerpc 1054b41a30aaSmrg basic_os=${basic_os}"spe" 1055a253d6aeSmrg ;; 1056b41a30aaSmrg mips3*-*) 1057b41a30aaSmrg cpu=mips64 1058a253d6aeSmrg ;; 1059b41a30aaSmrg ms1-*) 1060b41a30aaSmrg cpu=mt 1061a253d6aeSmrg ;; 1062b41a30aaSmrg m68knommu-*) 1063b41a30aaSmrg cpu=m68k 1064b41a30aaSmrg basic_os=linux 1065a253d6aeSmrg ;; 1066b41a30aaSmrg m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) 1067b41a30aaSmrg cpu=s12z 1068a253d6aeSmrg ;; 1069b41a30aaSmrg openrisc-*) 1070b41a30aaSmrg cpu=or32 1071a253d6aeSmrg ;; 1072b41a30aaSmrg parisc-*) 1073b41a30aaSmrg cpu=hppa 1074b41a30aaSmrg basic_os=linux 1075a253d6aeSmrg ;; 1076b41a30aaSmrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1077b41a30aaSmrg cpu=i586 1078a253d6aeSmrg ;; 107910f94802Smrg pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) 1080b41a30aaSmrg cpu=i686 1081a253d6aeSmrg ;; 1082b41a30aaSmrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1083b41a30aaSmrg cpu=i686 1084a253d6aeSmrg ;; 1085b41a30aaSmrg pentium4-*) 1086b41a30aaSmrg cpu=i786 1087a253d6aeSmrg ;; 1088b41a30aaSmrg pc98-*) 1089b41a30aaSmrg cpu=i386 1090a253d6aeSmrg ;; 1091b41a30aaSmrg ppc-* | ppcbe-*) 1092b41a30aaSmrg cpu=powerpc 1093a253d6aeSmrg ;; 1094b41a30aaSmrg ppcle-* | powerpclittle-*) 1095b41a30aaSmrg cpu=powerpcle 1096a253d6aeSmrg ;; 1097b41a30aaSmrg ppc64-*) 1098b41a30aaSmrg cpu=powerpc64 109957ee1794Smrg ;; 1100b41a30aaSmrg ppc64le-* | powerpc64little-*) 1101b41a30aaSmrg cpu=powerpc64le 1102a253d6aeSmrg ;; 1103b41a30aaSmrg sb1-*) 1104b41a30aaSmrg cpu=mipsisa64sb1 1105a253d6aeSmrg ;; 1106b41a30aaSmrg sb1el-*) 1107b41a30aaSmrg cpu=mipsisa64sb1el 110825b89263Smrg ;; 1109b41a30aaSmrg sh5e[lb]-*) 1110b41a30aaSmrg cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` 1111a253d6aeSmrg ;; 1112b41a30aaSmrg spur-*) 1113b41a30aaSmrg cpu=spur 1114a253d6aeSmrg ;; 1115b41a30aaSmrg strongarm-* | thumb-*) 1116b41a30aaSmrg cpu=arm 1117a253d6aeSmrg ;; 1118b41a30aaSmrg tx39-*) 1119b41a30aaSmrg cpu=mipstx39 1120a253d6aeSmrg ;; 1121b41a30aaSmrg tx39el-*) 1122b41a30aaSmrg cpu=mipstx39el 1123a253d6aeSmrg ;; 1124b41a30aaSmrg x64-*) 1125b41a30aaSmrg cpu=x86_64 1126a253d6aeSmrg ;; 1127b41a30aaSmrg xscale-* | xscalee[bl]-*) 1128b41a30aaSmrg cpu=`echo "$cpu" | sed 's/^xscale/arm/'` 1129a253d6aeSmrg ;; 113010f94802Smrg arm64-* | aarch64le-*) 1131b41a30aaSmrg cpu=aarch64 1132a253d6aeSmrg ;; 1133b41a30aaSmrg 1134b41a30aaSmrg # Recognize the canonical CPU Types that limit and/or modify the 1135b41a30aaSmrg # company names they are paired with. 1136b41a30aaSmrg cr16-*) 1137b41a30aaSmrg basic_os=${basic_os:-elf} 1138a253d6aeSmrg ;; 1139b41a30aaSmrg crisv32-* | etraxfs*-*) 1140b41a30aaSmrg cpu=crisv32 1141b41a30aaSmrg vendor=axis 1142a253d6aeSmrg ;; 1143b41a30aaSmrg cris-* | etrax*-*) 1144b41a30aaSmrg cpu=cris 1145b41a30aaSmrg vendor=axis 1146a253d6aeSmrg ;; 1147b41a30aaSmrg crx-*) 1148b41a30aaSmrg basic_os=${basic_os:-elf} 1149a253d6aeSmrg ;; 1150b41a30aaSmrg neo-tandem) 1151b41a30aaSmrg cpu=neo 1152b41a30aaSmrg vendor=tandem 1153a253d6aeSmrg ;; 1154b41a30aaSmrg nse-tandem) 1155b41a30aaSmrg cpu=nse 1156b41a30aaSmrg vendor=tandem 1157a253d6aeSmrg ;; 1158b41a30aaSmrg nsr-tandem) 1159b41a30aaSmrg cpu=nsr 1160b41a30aaSmrg vendor=tandem 1161a253d6aeSmrg ;; 1162b41a30aaSmrg nsv-tandem) 1163b41a30aaSmrg cpu=nsv 1164b41a30aaSmrg vendor=tandem 1165a253d6aeSmrg ;; 1166b41a30aaSmrg nsx-tandem) 1167b41a30aaSmrg cpu=nsx 1168b41a30aaSmrg vendor=tandem 1169a253d6aeSmrg ;; 1170b41a30aaSmrg mipsallegrexel-sony) 1171b41a30aaSmrg cpu=mipsallegrexel 1172b41a30aaSmrg vendor=sony 1173a253d6aeSmrg ;; 1174b41a30aaSmrg tile*-*) 1175b41a30aaSmrg basic_os=${basic_os:-linux-gnu} 1176a253d6aeSmrg ;; 1177b41a30aaSmrg 1178a253d6aeSmrg *) 1179b41a30aaSmrg # Recognize the canonical CPU types that are allowed with any 1180b41a30aaSmrg # company name. 1181b41a30aaSmrg case $cpu in 1182b41a30aaSmrg 1750a | 580 \ 1183b41a30aaSmrg | a29k \ 118410f94802Smrg | aarch64 | aarch64_be | aarch64c | arm64ec \ 1185b41a30aaSmrg | abacus \ 1186b41a30aaSmrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ 1187b41a30aaSmrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ 1188b41a30aaSmrg | alphapca5[67] | alpha64pca5[67] \ 1189b41a30aaSmrg | am33_2.0 \ 1190b41a30aaSmrg | amdgcn \ 1191b41a30aaSmrg | arc | arceb | arc32 | arc64 \ 1192b41a30aaSmrg | arm | arm[lb]e | arme[lb] | armv* \ 1193b41a30aaSmrg | avr | avr32 \ 1194b41a30aaSmrg | asmjs \ 1195b41a30aaSmrg | ba \ 1196b41a30aaSmrg | be32 | be64 \ 1197b41a30aaSmrg | bfin | bpf | bs2000 \ 1198b41a30aaSmrg | c[123]* | c30 | [cjt]90 | c4x \ 1199b41a30aaSmrg | c8051 | clipper | craynv | csky | cydra \ 1200b41a30aaSmrg | d10v | d30v | dlx | dsp16xx \ 1201b41a30aaSmrg | e2k | elxsi | epiphany \ 1202b41a30aaSmrg | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ 120310f94802Smrg | javascript \ 1204b41a30aaSmrg | h8300 | h8500 \ 1205b41a30aaSmrg | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 1206b41a30aaSmrg | hexagon \ 1207b41a30aaSmrg | i370 | i*86 | i860 | i960 | ia16 | ia64 \ 1208b41a30aaSmrg | ip2k | iq2000 \ 1209b41a30aaSmrg | k1om \ 121010f94802Smrg | kvx \ 1211b41a30aaSmrg | le32 | le64 \ 1212b41a30aaSmrg | lm32 \ 121310f94802Smrg | loongarch32 | loongarch64 \ 1214b41a30aaSmrg | m32c | m32r | m32rle \ 1215b41a30aaSmrg | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ 1216b41a30aaSmrg | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ 1217b41a30aaSmrg | m88110 | m88k | maxq | mb | mcore | mep | metag \ 1218b41a30aaSmrg | microblaze | microblazeel \ 121910f94802Smrg | mips* \ 1220b41a30aaSmrg | mmix \ 1221b41a30aaSmrg | mn10200 | mn10300 \ 1222b41a30aaSmrg | moxie \ 1223b41a30aaSmrg | mt \ 1224b41a30aaSmrg | msp430 \ 122510f94802Smrg | nanomips* \ 1226b41a30aaSmrg | nds32 | nds32le | nds32be \ 1227b41a30aaSmrg | nfp \ 1228b41a30aaSmrg | nios | nios2 | nios2eb | nios2el \ 1229b41a30aaSmrg | none | np1 | ns16k | ns32k | nvptx \ 1230b41a30aaSmrg | open8 \ 1231b41a30aaSmrg | or1k* \ 1232b41a30aaSmrg | or32 \ 1233b41a30aaSmrg | orion \ 1234b41a30aaSmrg | picochip \ 1235b41a30aaSmrg | pdp10 | pdp11 | pj | pjl | pn | power \ 1236b41a30aaSmrg | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ 1237b41a30aaSmrg | pru \ 1238b41a30aaSmrg | pyramid \ 1239b41a30aaSmrg | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ 1240b41a30aaSmrg | rl78 | romp | rs6000 | rx \ 1241b41a30aaSmrg | s390 | s390x \ 1242b41a30aaSmrg | score \ 1243b41a30aaSmrg | sh | shl \ 1244b41a30aaSmrg | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ 1245b41a30aaSmrg | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ 1246b41a30aaSmrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ 1247b41a30aaSmrg | sparclite \ 1248b41a30aaSmrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ 1249b41a30aaSmrg | spu \ 1250b41a30aaSmrg | tahoe \ 1251b41a30aaSmrg | thumbv7* \ 1252b41a30aaSmrg | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ 1253b41a30aaSmrg | tron \ 1254b41a30aaSmrg | ubicom32 \ 1255b41a30aaSmrg | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ 1256b41a30aaSmrg | vax \ 125710f94802Smrg | vc4 \ 1258b41a30aaSmrg | visium \ 1259b41a30aaSmrg | w65 \ 1260b41a30aaSmrg | wasm32 | wasm64 \ 1261b41a30aaSmrg | we32k \ 1262b41a30aaSmrg | x86 | x86_64 | xc16x | xgate | xps100 \ 1263b41a30aaSmrg | xstormy16 | xtensa* \ 1264b41a30aaSmrg | ymp \ 1265b41a30aaSmrg | z8k | z80) 1266b41a30aaSmrg ;; 1267b41a30aaSmrg 1268b41a30aaSmrg *) 126910f94802Smrg echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 1270b41a30aaSmrg exit 1 1271b41a30aaSmrg ;; 1272b41a30aaSmrg esac 1273a253d6aeSmrg ;; 1274a253d6aeSmrgesac 1275a253d6aeSmrg 1276a253d6aeSmrg# Here we canonicalize certain aliases for manufacturers. 1277b41a30aaSmrgcase $vendor in 1278b41a30aaSmrg digital*) 1279b41a30aaSmrg vendor=dec 1280a253d6aeSmrg ;; 1281b41a30aaSmrg commodore*) 1282b41a30aaSmrg vendor=cbm 1283a253d6aeSmrg ;; 1284a253d6aeSmrg *) 1285a253d6aeSmrg ;; 1286a253d6aeSmrgesac 1287a253d6aeSmrg 1288a253d6aeSmrg# Decode manufacturer-specific aliases for certain operating systems. 1289a253d6aeSmrg 129010f94802Smrgif test x"$basic_os" != x 1291a253d6aeSmrgthen 1292b41a30aaSmrg 129310f94802Smrg# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just 1294b41a30aaSmrg# set os. 129510f94802Smrgobj= 1296b41a30aaSmrgcase $basic_os in 1297b41a30aaSmrg gnu/linux*) 1298b41a30aaSmrg kernel=linux 1299b41a30aaSmrg os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` 1300b41a30aaSmrg ;; 1301b41a30aaSmrg os2-emx) 1302b41a30aaSmrg kernel=os2 1303b41a30aaSmrg os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` 1304b41a30aaSmrg ;; 1305b41a30aaSmrg nto-qnx*) 1306b41a30aaSmrg kernel=nto 1307b41a30aaSmrg os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` 1308b41a30aaSmrg ;; 1309b41a30aaSmrg *-*) 1310b41a30aaSmrg # shellcheck disable=SC2162 1311b41a30aaSmrg saved_IFS=$IFS 1312b41a30aaSmrg IFS="-" read kernel os <<EOF 1313b41a30aaSmrg$basic_os 1314b41a30aaSmrgEOF 1315b41a30aaSmrg IFS=$saved_IFS 1316b41a30aaSmrg ;; 1317b41a30aaSmrg # Default OS when just kernel was specified 1318b41a30aaSmrg nto*) 1319b41a30aaSmrg kernel=nto 1320b41a30aaSmrg os=`echo "$basic_os" | sed -e 's|nto|qnx|'` 1321b41a30aaSmrg ;; 1322b41a30aaSmrg linux*) 1323b41a30aaSmrg kernel=linux 1324b41a30aaSmrg os=`echo "$basic_os" | sed -e 's|linux|gnu|'` 1325b41a30aaSmrg ;; 132610f94802Smrg managarm*) 132710f94802Smrg kernel=managarm 132810f94802Smrg os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` 132910f94802Smrg ;; 1330b41a30aaSmrg *) 1331b41a30aaSmrg kernel= 1332b41a30aaSmrg os=$basic_os 1333b41a30aaSmrg ;; 1334b41a30aaSmrgesac 1335b41a30aaSmrg 1336b41a30aaSmrg# Now, normalize the OS (knowing we just have one component, it's not a kernel, 1337b41a30aaSmrg# etc.) 1338a253d6aeSmrgcase $os in 1339b41a30aaSmrg # First match some system type aliases that might get confused 1340b41a30aaSmrg # with valid system types. 1341b41a30aaSmrg # solaris* is a basic system type, with this one exception. 1342b41a30aaSmrg auroraux) 1343b41a30aaSmrg os=auroraux 134425b89263Smrg ;; 1345b41a30aaSmrg bluegene*) 1346b41a30aaSmrg os=cnk 1347a253d6aeSmrg ;; 1348b41a30aaSmrg solaris1 | solaris1.*) 1349b41a30aaSmrg os=`echo "$os" | sed -e 's|solaris1|sunos4|'` 1350a253d6aeSmrg ;; 1351b41a30aaSmrg solaris) 1352b41a30aaSmrg os=solaris2 1353a253d6aeSmrg ;; 1354b41a30aaSmrg unixware*) 1355b41a30aaSmrg os=sysv4.2uw 1356a253d6aeSmrg ;; 1357b41a30aaSmrg # es1800 is here to avoid being matched by es* (a different OS) 1358b41a30aaSmrg es1800*) 1359b41a30aaSmrg os=ose 1360a253d6aeSmrg ;; 1361b41a30aaSmrg # Some version numbers need modification 1362b41a30aaSmrg chorusos*) 1363b41a30aaSmrg os=chorusos 1364a253d6aeSmrg ;; 1365b41a30aaSmrg isc) 1366b41a30aaSmrg os=isc2.2 1367a253d6aeSmrg ;; 1368b41a30aaSmrg sco6) 1369b41a30aaSmrg os=sco5v6 1370a253d6aeSmrg ;; 1371b41a30aaSmrg sco5) 1372b41a30aaSmrg os=sco3.2v5 1373a253d6aeSmrg ;; 1374b41a30aaSmrg sco4) 1375b41a30aaSmrg os=sco3.2v4 1376a253d6aeSmrg ;; 1377b41a30aaSmrg sco3.2.[4-9]*) 1378b41a30aaSmrg os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` 1379a253d6aeSmrg ;; 1380b41a30aaSmrg sco*v* | scout) 1381b41a30aaSmrg # Don't match below 1382a253d6aeSmrg ;; 1383b41a30aaSmrg sco*) 1384b41a30aaSmrg os=sco3.2v2 1385a253d6aeSmrg ;; 1386b41a30aaSmrg psos*) 1387b41a30aaSmrg os=psos 1388a253d6aeSmrg ;; 1389b41a30aaSmrg qnx*) 1390b41a30aaSmrg os=qnx 1391a253d6aeSmrg ;; 1392b41a30aaSmrg hiux*) 1393b41a30aaSmrg os=hiuxwe2 1394a253d6aeSmrg ;; 1395b41a30aaSmrg lynx*178) 1396b41a30aaSmrg os=lynxos178 1397a253d6aeSmrg ;; 1398b41a30aaSmrg lynx*5) 1399b41a30aaSmrg os=lynxos5 1400a253d6aeSmrg ;; 1401b41a30aaSmrg lynxos*) 1402b41a30aaSmrg # don't get caught up in next wildcard 1403a253d6aeSmrg ;; 1404b41a30aaSmrg lynx*) 1405b41a30aaSmrg os=lynxos 1406a253d6aeSmrg ;; 1407b41a30aaSmrg mac[0-9]*) 1408b41a30aaSmrg os=`echo "$os" | sed -e 's|mac|macos|'` 1409a253d6aeSmrg ;; 1410b41a30aaSmrg opened*) 1411b41a30aaSmrg os=openedition 1412a253d6aeSmrg ;; 1413b41a30aaSmrg os400*) 1414b41a30aaSmrg os=os400 1415a253d6aeSmrg ;; 1416b41a30aaSmrg sunos5*) 1417b41a30aaSmrg os=`echo "$os" | sed -e 's|sunos5|solaris2|'` 1418a253d6aeSmrg ;; 1419b41a30aaSmrg sunos6*) 1420b41a30aaSmrg os=`echo "$os" | sed -e 's|sunos6|solaris3|'` 1421a253d6aeSmrg ;; 1422b41a30aaSmrg wince*) 1423b41a30aaSmrg os=wince 1424a253d6aeSmrg ;; 1425b41a30aaSmrg utek*) 1426b41a30aaSmrg os=bsd 1427a253d6aeSmrg ;; 1428b41a30aaSmrg dynix*) 1429b41a30aaSmrg os=bsd 1430a253d6aeSmrg ;; 1431b41a30aaSmrg acis*) 1432b41a30aaSmrg os=aos 1433a253d6aeSmrg ;; 1434b41a30aaSmrg atheos*) 1435b41a30aaSmrg os=atheos 1436a253d6aeSmrg ;; 1437b41a30aaSmrg syllable*) 1438b41a30aaSmrg os=syllable 1439a253d6aeSmrg ;; 1440b41a30aaSmrg 386bsd) 1441b41a30aaSmrg os=bsd 1442a253d6aeSmrg ;; 1443b41a30aaSmrg ctix* | uts*) 1444b41a30aaSmrg os=sysv 1445a253d6aeSmrg ;; 1446b41a30aaSmrg nova*) 1447b41a30aaSmrg os=rtmk-nova 1448a253d6aeSmrg ;; 1449b41a30aaSmrg ns2) 1450b41a30aaSmrg os=nextstep2 1451a253d6aeSmrg ;; 1452b41a30aaSmrg # Preserve the version number of sinix5. 1453b41a30aaSmrg sinix5.*) 1454b41a30aaSmrg os=`echo "$os" | sed -e 's|sinix|sysv|'` 1455a253d6aeSmrg ;; 1456b41a30aaSmrg sinix*) 1457b41a30aaSmrg os=sysv4 1458a253d6aeSmrg ;; 1459b41a30aaSmrg tpf*) 1460b41a30aaSmrg os=tpf 1461a253d6aeSmrg ;; 1462b41a30aaSmrg triton*) 1463b41a30aaSmrg os=sysv3 1464a253d6aeSmrg ;; 1465b41a30aaSmrg oss*) 1466b41a30aaSmrg os=sysv3 1467a253d6aeSmrg ;; 1468b41a30aaSmrg svr4*) 1469b41a30aaSmrg os=sysv4 1470a253d6aeSmrg ;; 1471b41a30aaSmrg svr3) 1472b41a30aaSmrg os=sysv3 1473a253d6aeSmrg ;; 1474b41a30aaSmrg sysvr4) 1475b41a30aaSmrg os=sysv4 1476a253d6aeSmrg ;; 1477b41a30aaSmrg ose*) 1478b41a30aaSmrg os=ose 1479a253d6aeSmrg ;; 1480b41a30aaSmrg *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) 1481b41a30aaSmrg os=mint 148225b89263Smrg ;; 1483b41a30aaSmrg dicos*) 1484b41a30aaSmrg os=dicos 148557ee1794Smrg ;; 1486b41a30aaSmrg pikeos*) 1487b41a30aaSmrg # Until real need of OS specific support for 1488b41a30aaSmrg # particular features comes up, bare metal 1489b41a30aaSmrg # configurations are quite functional. 1490b41a30aaSmrg case $cpu in 1491b41a30aaSmrg arm*) 1492b41a30aaSmrg os=eabi 1493b41a30aaSmrg ;; 1494b41a30aaSmrg *) 149510f94802Smrg os= 149610f94802Smrg obj=elf 1497b41a30aaSmrg ;; 1498b41a30aaSmrg esac 1499a253d6aeSmrg ;; 150010f94802Smrg aout* | coff* | elf* | pe*) 150110f94802Smrg # These are machine code file formats, not OSes 150210f94802Smrg obj=$os 150310f94802Smrg os= 150410f94802Smrg ;; 1505a253d6aeSmrg *) 1506b41a30aaSmrg # No normalization, but not necessarily accepted, that comes below. 1507a253d6aeSmrg ;; 1508a253d6aeSmrgesac 1509b41a30aaSmrg 1510a253d6aeSmrgelse 1511a253d6aeSmrg 1512a253d6aeSmrg# Here we handle the default operating systems that come with various machines. 1513a253d6aeSmrg# The value should be what the vendor currently ships out the door with their 1514a253d6aeSmrg# machine or put another way, the most popular os provided with the machine. 1515a253d6aeSmrg 1516a253d6aeSmrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 1517a253d6aeSmrg# "-sun"), then you have to tell the case statement up towards the top 1518a253d6aeSmrg# that MANUFACTURER isn't an operating system. Otherwise, code above 1519a253d6aeSmrg# will signal an error saying that MANUFACTURER isn't an operating 1520a253d6aeSmrg# system, and we'll never get to this point. 1521a253d6aeSmrg 1522b41a30aaSmrgkernel= 152310f94802Smrgobj= 1524b41a30aaSmrgcase $cpu-$vendor in 152557ee1794Smrg score-*) 152610f94802Smrg os= 152710f94802Smrg obj=elf 1528ea133fd7Smrg ;; 152957ee1794Smrg spu-*) 153010f94802Smrg os= 153110f94802Smrg obj=elf 1532ea133fd7Smrg ;; 1533a253d6aeSmrg *-acorn) 1534b41a30aaSmrg os=riscix1.2 1535a253d6aeSmrg ;; 1536a253d6aeSmrg arm*-rebel) 1537b41a30aaSmrg kernel=linux 1538b41a30aaSmrg os=gnu 1539a253d6aeSmrg ;; 1540a253d6aeSmrg arm*-semi) 154110f94802Smrg os= 154210f94802Smrg obj=aout 1543a253d6aeSmrg ;; 154457ee1794Smrg c4x-* | tic4x-*) 154510f94802Smrg os= 154610f94802Smrg obj=coff 154757ee1794Smrg ;; 154831637056Smrg c8051-*) 154910f94802Smrg os= 155010f94802Smrg obj=elf 1551b41a30aaSmrg ;; 1552b41a30aaSmrg clipper-intergraph) 1553b41a30aaSmrg os=clix 155431637056Smrg ;; 155557ee1794Smrg hexagon-*) 155610f94802Smrg os= 155710f94802Smrg obj=elf 1558ea133fd7Smrg ;; 155925b89263Smrg tic54x-*) 156010f94802Smrg os= 156110f94802Smrg obj=coff 156225b89263Smrg ;; 156325b89263Smrg tic55x-*) 156410f94802Smrg os= 156510f94802Smrg obj=coff 156625b89263Smrg ;; 156725b89263Smrg tic6x-*) 156810f94802Smrg os= 156910f94802Smrg obj=coff 157025b89263Smrg ;; 1571a253d6aeSmrg # This must come before the *-dec entry. 1572a253d6aeSmrg pdp10-*) 1573b41a30aaSmrg os=tops20 1574a253d6aeSmrg ;; 1575a253d6aeSmrg pdp11-*) 1576b41a30aaSmrg os=none 1577a253d6aeSmrg ;; 1578a253d6aeSmrg *-dec | vax-*) 1579b41a30aaSmrg os=ultrix4.2 1580a253d6aeSmrg ;; 1581a253d6aeSmrg m68*-apollo) 1582b41a30aaSmrg os=domain 1583a253d6aeSmrg ;; 1584a253d6aeSmrg i386-sun) 1585b41a30aaSmrg os=sunos4.0.2 1586a253d6aeSmrg ;; 1587a253d6aeSmrg m68000-sun) 1588b41a30aaSmrg os=sunos3 1589a253d6aeSmrg ;; 1590a253d6aeSmrg m68*-cisco) 159110f94802Smrg os= 159210f94802Smrg obj=aout 1593a253d6aeSmrg ;; 159457ee1794Smrg mep-*) 159510f94802Smrg os= 159610f94802Smrg obj=elf 1597ea133fd7Smrg ;; 1598a253d6aeSmrg mips*-cisco) 159910f94802Smrg os= 160010f94802Smrg obj=elf 1601a253d6aeSmrg ;; 160210f94802Smrg mips*-*|nanomips*-*) 160310f94802Smrg os= 160410f94802Smrg obj=elf 160557ee1794Smrg ;; 1606a253d6aeSmrg or32-*) 160710f94802Smrg os= 160810f94802Smrg obj=coff 1609a253d6aeSmrg ;; 1610a253d6aeSmrg *-tti) # must be before sparc entry or we get the wrong os. 1611b41a30aaSmrg os=sysv3 1612a253d6aeSmrg ;; 1613a253d6aeSmrg sparc-* | *-sun) 1614b41a30aaSmrg os=sunos4.1.1 1615a253d6aeSmrg ;; 1616b41a30aaSmrg pru-*) 161710f94802Smrg os= 161810f94802Smrg obj=elf 1619a253d6aeSmrg ;; 1620b41a30aaSmrg *-be) 1621b41a30aaSmrg os=beos 1622a253d6aeSmrg ;; 1623a253d6aeSmrg *-ibm) 1624b41a30aaSmrg os=aix 1625a253d6aeSmrg ;; 162657ee1794Smrg *-knuth) 1627b41a30aaSmrg os=mmixware 1628a253d6aeSmrg ;; 1629a253d6aeSmrg *-wec) 1630b41a30aaSmrg os=proelf 1631a253d6aeSmrg ;; 1632a253d6aeSmrg *-winbond) 1633b41a30aaSmrg os=proelf 1634a253d6aeSmrg ;; 1635a253d6aeSmrg *-oki) 1636b41a30aaSmrg os=proelf 1637a253d6aeSmrg ;; 1638a253d6aeSmrg *-hp) 1639b41a30aaSmrg os=hpux 1640a253d6aeSmrg ;; 1641a253d6aeSmrg *-hitachi) 1642b41a30aaSmrg os=hiux 1643a253d6aeSmrg ;; 1644a253d6aeSmrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1645b41a30aaSmrg os=sysv 1646a253d6aeSmrg ;; 1647a253d6aeSmrg *-cbm) 1648b41a30aaSmrg os=amigaos 1649a253d6aeSmrg ;; 1650a253d6aeSmrg *-dg) 1651b41a30aaSmrg os=dgux 1652a253d6aeSmrg ;; 1653a253d6aeSmrg *-dolphin) 1654b41a30aaSmrg os=sysv3 1655a253d6aeSmrg ;; 1656a253d6aeSmrg m68k-ccur) 1657b41a30aaSmrg os=rtu 1658a253d6aeSmrg ;; 1659a253d6aeSmrg m88k-omron*) 1660b41a30aaSmrg os=luna 1661a253d6aeSmrg ;; 1662b41a30aaSmrg *-next) 1663b41a30aaSmrg os=nextstep 1664a253d6aeSmrg ;; 1665a253d6aeSmrg *-sequent) 1666b41a30aaSmrg os=ptx 1667a253d6aeSmrg ;; 1668a253d6aeSmrg *-crds) 1669b41a30aaSmrg os=unos 1670a253d6aeSmrg ;; 1671a253d6aeSmrg *-ns) 1672b41a30aaSmrg os=genix 1673a253d6aeSmrg ;; 1674a253d6aeSmrg i370-*) 1675b41a30aaSmrg os=mvs 1676a253d6aeSmrg ;; 1677a253d6aeSmrg *-gould) 1678b41a30aaSmrg os=sysv 1679a253d6aeSmrg ;; 1680a253d6aeSmrg *-highlevel) 1681b41a30aaSmrg os=bsd 1682a253d6aeSmrg ;; 1683a253d6aeSmrg *-encore) 1684b41a30aaSmrg os=bsd 1685a253d6aeSmrg ;; 1686a253d6aeSmrg *-sgi) 1687b41a30aaSmrg os=irix 1688a253d6aeSmrg ;; 1689a253d6aeSmrg *-siemens) 1690b41a30aaSmrg os=sysv4 1691a253d6aeSmrg ;; 1692a253d6aeSmrg *-masscomp) 1693b41a30aaSmrg os=rtu 1694a253d6aeSmrg ;; 1695a253d6aeSmrg f30[01]-fujitsu | f700-fujitsu) 1696b41a30aaSmrg os=uxpv 1697a253d6aeSmrg ;; 1698a253d6aeSmrg *-rom68k) 169910f94802Smrg os= 170010f94802Smrg obj=coff 1701a253d6aeSmrg ;; 1702a253d6aeSmrg *-*bug) 170310f94802Smrg os= 170410f94802Smrg obj=coff 1705a253d6aeSmrg ;; 1706a253d6aeSmrg *-apple) 1707b41a30aaSmrg os=macos 1708a253d6aeSmrg ;; 1709a253d6aeSmrg *-atari*) 1710b41a30aaSmrg os=mint 1711b41a30aaSmrg ;; 1712b41a30aaSmrg *-wrs) 1713b41a30aaSmrg os=vxworks 1714a253d6aeSmrg ;; 1715a253d6aeSmrg *) 1716b41a30aaSmrg os=none 1717a253d6aeSmrg ;; 1718a253d6aeSmrgesac 1719b41a30aaSmrg 1720a253d6aeSmrgfi 1721a253d6aeSmrg 172210f94802Smrg# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). 172310f94802Smrg 1724b41a30aaSmrgcase $os in 1725b41a30aaSmrg # Sometimes we do "kernel-libc", so those need to count as OSes. 172610f94802Smrg llvm* | musl* | newlib* | relibc* | uclibc*) 1727b41a30aaSmrg ;; 1728b41a30aaSmrg # Likewise for "kernel-abi" 1729b41a30aaSmrg eabi* | gnueabi*) 1730b41a30aaSmrg ;; 1731b41a30aaSmrg # VxWorks passes extra cpu info in the 4th filed. 1732b41a30aaSmrg simlinux | simwindows | spe) 1733b41a30aaSmrg ;; 173410f94802Smrg # See `case $cpu-$os` validation below 173510f94802Smrg ghcjs) 173610f94802Smrg ;; 1737b41a30aaSmrg # Now accept the basic system types. 1738b41a30aaSmrg # The portable systems comes first. 1739b41a30aaSmrg # Each alternative MUST end in a * to match a version number. 1740b41a30aaSmrg gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ 1741b41a30aaSmrg | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ 1742b41a30aaSmrg | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ 1743b41a30aaSmrg | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ 1744b41a30aaSmrg | hiux* | abug | nacl* | netware* | windows* \ 174510f94802Smrg | os9* | macos* | osx* | ios* | tvos* | watchos* \ 1746b41a30aaSmrg | mpw* | magic* | mmixware* | mon960* | lnews* \ 1747b41a30aaSmrg | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ 1748b41a30aaSmrg | aos* | aros* | cloudabi* | sortix* | twizzler* \ 1749b41a30aaSmrg | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ 1750b41a30aaSmrg | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ 1751b41a30aaSmrg | mirbsd* | netbsd* | dicos* | openedition* | ose* \ 1752b41a30aaSmrg | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ 1753b41a30aaSmrg | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ 175410f94802Smrg | bosx* | nextstep* | cxux* | oabi* \ 175510f94802Smrg | ptx* | ecoff* | winnt* | domain* | vsta* \ 1756b41a30aaSmrg | udi* | lites* | ieee* | go32* | aux* | hcos* \ 1757b41a30aaSmrg | chorusrdb* | cegcc* | glidix* | serenity* \ 175810f94802Smrg | cygwin* | msys* | moss* | proelf* | rtems* \ 1759b41a30aaSmrg | midipix* | mingw32* | mingw64* | mint* \ 1760b41a30aaSmrg | uxpv* | beos* | mpeix* | udk* | moxiebox* \ 1761b41a30aaSmrg | interix* | uwin* | mks* | rhapsody* | darwin* \ 1762b41a30aaSmrg | openstep* | oskit* | conix* | pw32* | nonstopux* \ 1763b41a30aaSmrg | storm-chaos* | tops10* | tenex* | tops20* | its* \ 1764b41a30aaSmrg | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ 1765b41a30aaSmrg | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ 1766b41a30aaSmrg | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ 1767b41a30aaSmrg | skyos* | haiku* | rdos* | toppers* | drops* | es* \ 1768b41a30aaSmrg | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ 1769b41a30aaSmrg | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ 177010f94802Smrg | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ 177110f94802Smrg | fiwix* | mlibc* | cos* | mbr* | ironclad* ) 1772b41a30aaSmrg ;; 1773b41a30aaSmrg # This one is extra strict with allowed versions 1774b41a30aaSmrg sco3.2v2 | sco3.2v[4-9]* | sco5v6*) 1775b41a30aaSmrg # Don't forget version if it is 3.2v4 or newer. 1776b41a30aaSmrg ;; 177710f94802Smrg # This refers to builds using the UEFI calling convention 177810f94802Smrg # (which depends on the architecture) and PE file format. 177910f94802Smrg # Note that this is both a different calling convention and 178010f94802Smrg # different file format than that of GNU-EFI 178110f94802Smrg # (x86_64-w64-mingw32). 178210f94802Smrg uefi) 178310f94802Smrg ;; 1784b41a30aaSmrg none) 1785b41a30aaSmrg ;; 178610f94802Smrg kernel* | msvc* ) 178710f94802Smrg # Restricted further below 178810f94802Smrg ;; 178910f94802Smrg '') 179010f94802Smrg if test x"$obj" = x 179110f94802Smrg then 179210f94802Smrg echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 179310f94802Smrg fi 179410f94802Smrg ;; 1795b41a30aaSmrg *) 179610f94802Smrg echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 179710f94802Smrg exit 1 179810f94802Smrg ;; 179910f94802Smrgesac 180010f94802Smrg 180110f94802Smrgcase $obj in 180210f94802Smrg aout* | coff* | elf* | pe*) 180310f94802Smrg ;; 180410f94802Smrg '') 180510f94802Smrg # empty is fine 180610f94802Smrg ;; 180710f94802Smrg *) 180810f94802Smrg echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 180910f94802Smrg exit 1 181010f94802Smrg ;; 181110f94802Smrgesac 181210f94802Smrg 181310f94802Smrg# Here we handle the constraint that a (synthetic) cpu and os are 181410f94802Smrg# valid only in combination with each other and nowhere else. 181510f94802Smrgcase $cpu-$os in 181610f94802Smrg # The "javascript-unknown-ghcjs" triple is used by GHC; we 181710f94802Smrg # accept it here in order to tolerate that, but reject any 181810f94802Smrg # variations. 181910f94802Smrg javascript-ghcjs) 182010f94802Smrg ;; 182110f94802Smrg javascript-* | *-ghcjs) 182210f94802Smrg echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 1823b41a30aaSmrg exit 1 1824b41a30aaSmrg ;; 1825b41a30aaSmrgesac 1826b41a30aaSmrg 1827b41a30aaSmrg# As a final step for OS-related things, validate the OS-kernel combination 1828b41a30aaSmrg# (given a valid OS), if there is a kernel. 182910f94802Smrgcase $kernel-$os-$obj in 183010f94802Smrg linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ 183110f94802Smrg | linux-mlibc*- | linux-musl*- | linux-newlib*- \ 183210f94802Smrg | linux-relibc*- | linux-uclibc*- ) 183310f94802Smrg ;; 183410f94802Smrg uclinux-uclibc*- ) 183510f94802Smrg ;; 183610f94802Smrg managarm-mlibc*- | managarm-kernel*- ) 1837b41a30aaSmrg ;; 183810f94802Smrg windows*-msvc*-) 1839b41a30aaSmrg ;; 184010f94802Smrg -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ 184110f94802Smrg | -uclibc*- ) 1842b41a30aaSmrg # These are just libc implementations, not actual OSes, and thus 1843b41a30aaSmrg # require a kernel. 184410f94802Smrg echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 1845b41a30aaSmrg exit 1 1846b41a30aaSmrg ;; 184710f94802Smrg -kernel*- ) 184810f94802Smrg echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 184910f94802Smrg exit 1 1850b41a30aaSmrg ;; 185110f94802Smrg *-kernel*- ) 185210f94802Smrg echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 185310f94802Smrg exit 1 1854b41a30aaSmrg ;; 185510f94802Smrg *-msvc*- ) 185610f94802Smrg echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 185710f94802Smrg exit 1 1858b41a30aaSmrg ;; 185910f94802Smrg kfreebsd*-gnu*- | kopensolaris*-gnu*-) 186010f94802Smrg ;; 186110f94802Smrg vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) 186210f94802Smrg ;; 186310f94802Smrg nto-qnx*-) 186410f94802Smrg ;; 186510f94802Smrg os2-emx-) 1866b41a30aaSmrg ;; 186710f94802Smrg *-eabi*- | *-gnueabi*-) 1868b41a30aaSmrg ;; 186910f94802Smrg none--*) 187010f94802Smrg # None (no kernel, i.e. freestanding / bare metal), 187110f94802Smrg # can be paired with an machine code file format 187210f94802Smrg ;; 187310f94802Smrg -*-) 1874b41a30aaSmrg # Blank kernel with real OS is always fine. 1875b41a30aaSmrg ;; 187610f94802Smrg --*) 187710f94802Smrg # Blank kernel and OS with real machine code file format is always fine. 187810f94802Smrg ;; 187910f94802Smrg *-*-*) 188010f94802Smrg echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 1881b41a30aaSmrg exit 1 1882b41a30aaSmrg ;; 1883b41a30aaSmrgesac 1884b41a30aaSmrg 1885a253d6aeSmrg# Here we handle the case where we know the os, and the CPU type, but not the 1886a253d6aeSmrg# manufacturer. We pick the logical manufacturer. 1887b41a30aaSmrgcase $vendor in 1888b41a30aaSmrg unknown) 1889b41a30aaSmrg case $cpu-$os in 1890b41a30aaSmrg *-riscix*) 1891a253d6aeSmrg vendor=acorn 1892a253d6aeSmrg ;; 1893b41a30aaSmrg *-sunos*) 1894a253d6aeSmrg vendor=sun 1895a253d6aeSmrg ;; 1896b41a30aaSmrg *-cnk* | *-aix*) 1897a253d6aeSmrg vendor=ibm 1898a253d6aeSmrg ;; 1899b41a30aaSmrg *-beos*) 1900a253d6aeSmrg vendor=be 1901a253d6aeSmrg ;; 1902b41a30aaSmrg *-hpux*) 1903a253d6aeSmrg vendor=hp 1904a253d6aeSmrg ;; 1905b41a30aaSmrg *-mpeix*) 1906a253d6aeSmrg vendor=hp 1907a253d6aeSmrg ;; 1908b41a30aaSmrg *-hiux*) 1909a253d6aeSmrg vendor=hitachi 1910a253d6aeSmrg ;; 1911b41a30aaSmrg *-unos*) 1912a253d6aeSmrg vendor=crds 1913a253d6aeSmrg ;; 1914b41a30aaSmrg *-dgux*) 1915a253d6aeSmrg vendor=dg 1916a253d6aeSmrg ;; 1917b41a30aaSmrg *-luna*) 1918a253d6aeSmrg vendor=omron 1919a253d6aeSmrg ;; 1920b41a30aaSmrg *-genix*) 1921a253d6aeSmrg vendor=ns 1922a253d6aeSmrg ;; 1923b41a30aaSmrg *-clix*) 1924b41a30aaSmrg vendor=intergraph 1925b41a30aaSmrg ;; 1926b41a30aaSmrg *-mvs* | *-opened*) 1927b41a30aaSmrg vendor=ibm 1928b41a30aaSmrg ;; 1929b41a30aaSmrg *-os400*) 1930a253d6aeSmrg vendor=ibm 1931a253d6aeSmrg ;; 1932b41a30aaSmrg s390-* | s390x-*) 1933a253d6aeSmrg vendor=ibm 1934a253d6aeSmrg ;; 1935b41a30aaSmrg *-ptx*) 1936a253d6aeSmrg vendor=sequent 1937a253d6aeSmrg ;; 1938b41a30aaSmrg *-tpf*) 1939a253d6aeSmrg vendor=ibm 1940a253d6aeSmrg ;; 1941b41a30aaSmrg *-vxsim* | *-vxworks* | *-windiss*) 1942a253d6aeSmrg vendor=wrs 1943a253d6aeSmrg ;; 1944b41a30aaSmrg *-aux*) 1945a253d6aeSmrg vendor=apple 1946a253d6aeSmrg ;; 1947b41a30aaSmrg *-hms*) 1948a253d6aeSmrg vendor=hitachi 1949a253d6aeSmrg ;; 1950b41a30aaSmrg *-mpw* | *-macos*) 1951a253d6aeSmrg vendor=apple 1952a253d6aeSmrg ;; 1953b41a30aaSmrg *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) 1954a253d6aeSmrg vendor=atari 1955a253d6aeSmrg ;; 1956b41a30aaSmrg *-vos*) 1957a253d6aeSmrg vendor=stratus 1958a253d6aeSmrg ;; 1959a253d6aeSmrg esac 1960a253d6aeSmrg ;; 1961a253d6aeSmrgesac 1962a253d6aeSmrg 196310f94802Smrgecho "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" 1964a253d6aeSmrgexit 1965a253d6aeSmrg 1966a253d6aeSmrg# Local variables: 1967b41a30aaSmrg# eval: (add-hook 'before-save-hook 'time-stamp) 1968a253d6aeSmrg# time-stamp-start: "timestamp='" 1969a253d6aeSmrg# time-stamp-format: "%:y-%02m-%02d" 1970a253d6aeSmrg# time-stamp-end: "'" 1971a253d6aeSmrg# End: 1972