Skip to content
Snippets Groups Projects
config.sub 30.7 KiB
Newer Older
  • Learn to ignore specific revisions
  • 	# Here we normalize CPU types with a missing or matching vendor
    	dpx20-unknown | dpx20-bull)
    		cpu=rs6000
    		vendor=bull
    		os=${os:-bosx}
    
    
    	# Here we normalize CPU types irrespective of the vendor
    	amd64-*)
    		cpu=x86_64
    
    	blackfin-*)
    		cpu=bfin
    		os=linux
    
    	e500v[12]-*)
    		cpu=powerpc
    		os=$os"spe"
    
    	mips3*-*)
    		cpu=mips64
    
    	m68knommu-*)
    		cpu=m68k
    		os=linux
    
    	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
    		cpu=s12z
    
    	openrisc-*)
    		cpu=or32
    
    	parisc-*)
    		cpu=hppa
    		os=linux
    
    	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
    		cpu=i586
    
    	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
    		cpu=i686
    
    	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
    		cpu=i686
    
    	pentium4-*)
    		cpu=i786
    
    	ppc-* | ppcbe-*)
    		cpu=powerpc
    
    	ppcle-* | powerpclittle-*)
    		cpu=powerpcle
    
    	ppc64-*)
    		cpu=powerpc64
    
    	ppc64le-* | powerpc64little-*)
    		cpu=powerpc64le
    
    	sb1-*)
    		cpu=mipsisa64sb1
    
    	sb1el-*)
    		cpu=mipsisa64sb1el
    
    	sh5e[lb]-*)
    		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
    
    	strongarm-* | thumb-*)
    		cpu=arm
    
    	tx39-*)
    		cpu=mipstx39
    
    	tx39el-*)
    		cpu=mipstx39el
    
    	xscale-* | xscalee[bl]-*)
    		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
    
    
    	# Recognize the canonical CPU Types that limit and/or modify the
    	# company names they are paired with.
    	cr16-*)
    		os=${os:-elf}
    
    	crisv32-* | etraxfs*-*)
    		cpu=crisv32
    		vendor=axis
    
    	cris-* | etrax*-*)
    		cpu=cris
    		vendor=axis
    
    	crx-*)
    		os=${os:-elf}
    
    	neo-tandem)
    		cpu=neo
    		vendor=tandem
    
    	nse-tandem)
    		cpu=nse
    		vendor=tandem
    
    	nsr-tandem)
    		cpu=nsr
    		vendor=tandem
    
    	nsv-tandem)
    		cpu=nsv
    		vendor=tandem
    
    	nsx-tandem)
    		cpu=nsx
    		vendor=tandem
    
    	s390-*)
    		cpu=s390
    		vendor=ibm
    		;;
    	s390x-*)
    		cpu=s390x
    		vendor=ibm
    
    	tile*-*)
    		os=${os:-linux-gnu}
    
    		# Recognize the canonical CPU types that are allowed with any
    		# company name.
    		case $cpu in
    			1750a | 580 \
    			| a29k \
    			| aarch64 | aarch64_be \
    			| abacus \
    			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
    			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
    			| alphapca5[67] | alpha64pca5[67] \
    			| am33_2.0 \
    			| amdgcn \
    			| arc | arceb \
    			| arm  | arm[lb]e | arme[lb] | armv* \
    			| avr | avr32 \
    			| asmjs \
    			| ba \
    			| be32 | be64 \
    			| bfin | bs2000 \
    			| c[123]* | c30 | [cjt]90 | c4x \
    			| c8051 | clipper | craynv | csky | cydra \
    			| d10v | d30v | dlx | dsp16xx \
    			| e2k | elxsi | epiphany \
    			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
    			| h8300 | h8500 \
    			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    			| hexagon \
    			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
    			| ip2k | iq2000 \
    			| k1om \
    			| le32 | le64 \
    			| lm32 \
    			| m32c | m32r | m32rle \
    			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
    			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
    			| m88110 | m88k | maxq | mb | mcore | mep | metag \
    			| microblaze | microblazeel \
    			| mips | mipsbe | mipseb | mipsel | mipsle \
    			| mips16 \
    			| mips64 | mips64el \
    			| mips64octeon | mips64octeonel \
    			| mips64orion | mips64orionel \
    			| mips64r5900 | mips64r5900el \
    			| mips64vr | mips64vrel \
    			| mips64vr4100 | mips64vr4100el \
    			| mips64vr4300 | mips64vr4300el \
    			| mips64vr5000 | mips64vr5000el \
    			| mips64vr5900 | mips64vr5900el \
    			| mipsisa32 | mipsisa32el \
    			| mipsisa32r2 | mipsisa32r2el \
    			| mipsisa32r6 | mipsisa32r6el \
    			| mipsisa64 | mipsisa64el \
    			| mipsisa64r2 | mipsisa64r2el \
    			| mipsisa64r6 | mipsisa64r6el \
    			| mipsisa64sb1 | mipsisa64sb1el \
    			| mipsisa64sr71k | mipsisa64sr71kel \
    			| mipsr5900 | mipsr5900el \
    			| mipstx39 | mipstx39el \
    			| mmix \
    			| mn10200 | mn10300 \
    			| moxie \
    			| mt \
    			| msp430 \
    			| nds32 | nds32le | nds32be \
    			| nfp \
    			| nios | nios2 | nios2eb | nios2el \
    			| none | np1 | ns16k | ns32k \
    			| open8 \
    			| or1k* \
    			| or32 \
    			| orion \
    			| pdp10 | pdp11 | pj | pjl | pn | power \
    			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
    			| pru \
    			| pyramid \
    			| riscv | riscv32 | riscv64 \
    			| rl78 | romp | rs6000 | rx \
    			| score \
    			| sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
    			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
    			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
    			| sparclite \
    			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
    			| spu \
    			| tahoe \
    			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
    			| tron \
    			| ubicom32 \
    			| v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
    			| vax \
    			| visium \
    			| wasm32 \
    			| we32k \
    			| x86 | x86_64 | xc16x | xgate | xps100 \
    			| xstormy16 | xtensa* \
    			| ymp \
    			| z8k | z80)
    				;;
    
    			*)
    				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
    				exit 1
    				;;
    		esac
    
    		;;
    esac
    
    # Here we canonicalize certain aliases for manufacturers.
    
    case $vendor in
    	digital*)
    		vendor=dec
    
    	commodore*)
    		vendor=cbm
    
    		;;
    	*)
    		;;
    esac
    
    # Decode manufacturer-specific aliases for certain operating systems.
    
    
    if [ x$os != x ]
    
    	# First match some system type aliases that might get confused
    	# with valid system types.
    	# solaris* is a basic system type, with this one exception.
    	auroraux)
    		os=auroraux
    
    	solaris1 | solaris1.*)
    		os=`echo $os | sed -e 's|solaris1|sunos4|'`
    
    	solaris)
    		os=solaris2
    
    	unixware*)
    		os=sysv4.2uw
    
    		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
    		;;
    
    	# es1800 is here to avoid being matched by es* (a different OS)
    	es1800*)
    		os=ose
    		;;
    	# Some version numbers need modification
    	chorusos*)
    		os=chorusos
    		;;
    	isc)
    		os=isc2.2
    		;;
    	sco6)
    		os=sco5v6
    		;;
    	sco5)
    		os=sco3.2v5
    		;;
    	sco4)
    		os=sco3.2v4
    		;;
    	sco3.2.[4-9]*)
    		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
    		;;
    	sco3.2v[4-9]* | sco5v6*)
    		# Don't forget version if it is 3.2v4 or newer.
    		;;
    	scout)
    		# Don't match below
    		;;
    	sco*)
    		os=sco3.2v2
    		;;
    	psos*)
    		os=psos
    		;;
    	# Now accept the basic system types.
    
    	# Each alternative MUST end in a * to match a version number.
    	# sysv* is not here because it comes later, after sysvr4.
    	gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
    	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
    	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
    	     | sym* | kopensolaris* | plan9* \
    	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
    	     | aos* | aros* | cloudabi* | sortix* \
    	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
    	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
    	     | knetbsd* | mirbsd* | netbsd* \
    	     | bitrig* | openbsd* | solidbsd* | libertybsd* \
    	     | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
    	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
    	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
    	     | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
    	     | chorusrdb* | cegcc* | glidix* \
    	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
    	     | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
    	     | linux-newlib* | linux-musl* | linux-uclibc* \
    	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
    	     | interix* | uwin* | mks* | rhapsody* | darwin* \
    	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
    	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
    	     | os2* | vos* | palmos* | uclinux* | nucleus* \
    	     | morphos* | superux* | rtmk* | windiss* \
    	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
    	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
    	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
    	     | midnightbsd* | amdhsa* | unleashed*)
    
    	# Remember, each alternative MUST END IN *, to match a version number.
    		;;
    
    	qnx*)
    		case $cpu in
    		    x86 | i*86)
    
    	nto*)
    		os=`echo $os | sed -e 's|nto|nto-qnx|'`
    
    	sim | xray | os68k* | v88r* \
    	    | windows* | osx | abug | netware* | os9* \
    	    | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
    
    	linux-dietlibc)
    		os=linux-dietlibc
    
    		os=`echo $os | sed -e 's|linux|linux-gnu|'`
    		;;
    
    	lynx*178)
    		os=lynxos178
    
    	mac*)
    		os=`echo "$os" | sed -e 's|mac|macos|'`
    
    	opened*)
    		os=openedition
    
    	sunos5*)
    		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
    
    	sunos6*)
    		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
    
    	syllable*)
    		os=syllable
    		;;
    	386bsd)
    		os=bsd
    
    	ctix* | uts*)
    		os=sysv
    
    	nova*)
    		os=rtmk-nova
    
    	# This must come after sysvr4.
    	sysv*)
    
    	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
    		os=mint
    
    	pikeos*)
    		# Until real need of OS specific support for
    		# particular features comes up, bare metal
    		# configurations are quite functional.
    		case $cpu in
    		    arm*)
    			os=eabi
    			;;
    		    *)
    			os=elf
    			;;
    		esac
    
    		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
    
    		exit 1
    		;;
    esac
    else
    
    # Here we handle the default operating systems that come with various machines.
    # The value should be what the vendor currently ships out the door with their
    # machine or put another way, the most popular os provided with the machine.
    
    # Note that if you're going to try to match "-MANUFACTURER" here (say,
    # "-sun"), then you have to tell the case statement up towards the top
    # that MANUFACTURER isn't an operating system.  Otherwise, code above
    # will signal an error saying that MANUFACTURER isn't an operating
    # system, and we'll never get to this point.
    
    
    case $cpu-$vendor in
    
    		os=elf
    		;;
    	clipper-intergraph)
    		os=clix
    
    	# This must come before the *-dec entry.
    	pdp10-*)
    
    		;;
    	*-tti)	# must be before sparc entry or we get the wrong os.
    
    		;;
    	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
    
    	*-next)
    		os=nextstep
    
    		;;
    esac
    fi
    
    # Here we handle the case where we know the os, and the CPU type, but not the
    # manufacturer.  We pick the logical manufacturer.
    
    case $vendor in
    	unknown)
    
    			clix*)
    				vendor=intergraph
    				;;
    			mvs* | opened*)
    
    			vxsim* | vxworks* | windiss*)
    
    			mpw* | macos*)
    
    			*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
    
    echo "$cpu-$vendor-$os"
    
    # eval: (add-hook 'before-save-hook 'time-stamp)
    
    # time-stamp-start: "timestamp='"
    # time-stamp-format: "%:y-%02m-%02d"
    # time-stamp-end: "'"
    # End: