From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2124) id BBF14385DC2F; Thu, 4 Jan 2024 12:02:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBF14385DC2F Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nick Clifton To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] Synchronize config.sub and config.guess with their upstream master versions. X-Act-Checkin: binutils-gdb X-Git-Author: Nick Clifton X-Git-Refname: refs/heads/master X-Git-Oldrev: e493ba6255aec08885affbb68ddc0a025583d528 X-Git-Newrev: ce3abd4734c1d4994937dc0defa71c4ac9f34185 Message-Id: <20240104120205.BBF14385DC2F@sourceware.org> Date: Thu, 4 Jan 2024 12:02:05 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2024 12:02:05 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dce3abd4734c1= d4994937dc0defa71c4ac9f34185 commit ce3abd4734c1d4994937dc0defa71c4ac9f34185 Author: Nick Clifton Date: Thu Jan 4 12:00:34 2024 +0000 Synchronize config.sub and config.guess with their upstream master vers= ions. =20 Brings in: commit 28ea239c53a2d5d8800c472bc2452eaa16e37af2 config.sub: Remove w= indows-gnu commit a6976af01b0c6206561782183a0db42124b19f7b config.sub: recognis= e ARM64EC machine type commit 4e60c54be77f743ff8018ab58fb36fd8bc055e2a config.sub: allow aa= rch64c-unknown-freebsd commit e4786449e1c26716e3f9ea182caf472e4dbc96e0 config.guess: invoke= "uname -p" from PATH for non-arm FreeBSD commit 021155df7fad97a5ae1baa354e15a03ea14500b4 config.guess: Detect= Android (as opposed to GNU/Linux) commit 6c78704d542cebfb56d17474fe9f8395e9defb94 config.sub: add java= script-*-ghcjs commit 2a7c4b64d4aec5c3a8a975625f0f8c369d365667 testsuite: add cover= age for vendor-clobbering commit 39c49ea712cba8ae6613ef85ab22fe7c552b48b0 config.sub: Systemat= ize parsing of machine code formats commit d4e37b5868ef910e3e52744c34408084bb13051c config.sub: Handle a= rbitrary MIPS CPU names commit af8d803a82436779d35ea389888788c78677804e config.guess (aarch6= 4:Linux:*:*): Detect 32-bit ABI commit 602766470c886df7ae07bcfd7dcf532f0783d3e0 Add KVX MPPA detecti= on commit be68d790b6bc7dd84982fa6760f1448e92849e63 config.sub: Add Appl= e tvOS and watchOS commit 998ba1414387b4ce1a519be234e1609bc7912e0c config.sub: Accept $= cpu-$vendor-none-{coff,elf} Diff: --- config.guess | 30 +++++++++- config.sub | 183 +++++++++++++++++++++++++++++++++++++------------------= ---- 2 files changed, 141 insertions(+), 72 deletions(-) diff --git a/config.guess b/config.guess index 72d235025ed..cdfc4392047 100755 --- a/config.guess +++ b/config.guess @@ -4,7 +4,7 @@ =20 # shellcheck disable=3DSC2006,SC2268 # see below for rationale =20 -timestamp=3D'2023-06-23' +timestamp=3D'2023-08-22' =20 # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -155,6 +155,9 @@ Linux|GNU|GNU/*) =20 set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=3Dandroid + #else #include #if defined(__UCLIBC__) LIBC=3Duclibc @@ -169,6 +172,7 @@ Linux|GNU|GNU/*) LIBC=3Dmusl #endif #endif + #endif EOF cc_set_libc=3D`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | s= ed 's, ,,g'` eval "$cc_set_libc" @@ -904,7 +908,7 @@ EOF fi ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=3D`/usr/bin/uname -p` + UNAME_PROCESSOR=3D`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=3Dx86_64 ;; @@ -976,7 +980,27 @@ EOF GUESS=3D$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=3D$UNAME_MACHINE + LIBCABI=3D$LIBC + if test "$CC_FOR_BUILD" !=3D no_compiler_found; then + ABI=3D64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=3Deabihf + #else + ABI=3Deabi + #endif + #endif +EOF + cc_set_abi=3D`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' |= sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=3Darmv8l; LIBCABI=3D$LIBC$ABI ;; + esac + fi + GUESS=3D$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=3Daarch64_be diff --git a/config.sub b/config.sub index 9a7a3ed642d..defe52c0c87 100755 --- a/config.sub +++ b/config.sub @@ -4,7 +4,7 @@ =20 # shellcheck disable=3DSC2006,SC2268 # see below for rationale =20 -timestamp=3D'2023-06-26' +timestamp=3D'2023-09-19' =20 # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1181,7 +1181,7 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ | a29k \ - | aarch64 | aarch64_be \ + | aarch64 | aarch64_be | aarch64c | arm64ec \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ @@ -1200,6 +1200,7 @@ case $cpu-$vendor in | d10v | d30v | dlx | dsp16xx \ | e2k | elxsi | epiphany \ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | javascript \ | h8300 | h8500 \ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ @@ -1215,31 +1216,7 @@ case $cpu-$vendor in | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64eb | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r3 | mipsisa32r3el \ - | mipsisa32r5 | mipsisa32r5el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r3 | mipsisa64r3el \ - | mipsisa64r5 | mipsisa64r5el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ + | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ @@ -1308,11 +1285,12 @@ esac =20 # Decode manufacturer-specific aliases for certain operating systems. =20 -if test x$basic_os !=3D x +if test x"$basic_os" !=3D x then =20 # First recognize some ad-hoc cases, or perhaps split kernel-os, or else j= ust # set os. +obj=3D case $basic_os in gnu/linux*) kernel=3Dlinux @@ -1512,10 +1490,16 @@ case $os in os=3Deabi ;; *) - os=3Delf + os=3D + obj=3Delf ;; esac ;; + aout* | coff* | elf* | pe*) + # These are machine code file formats, not OSes + obj=3D$os + os=3D + ;; *) # No normalization, but not necessarily accepted, that comes below. ;; @@ -1534,12 +1518,15 @@ else # system, and we'll never get to this point. =20 kernel=3D +obj=3D case $cpu-$vendor in score-*) - os=3Delf + os=3D + obj=3Delf ;; spu-*) - os=3Delf + os=3D + obj=3Delf ;; *-acorn) os=3Driscix1.2 @@ -1549,28 +1536,35 @@ case $cpu-$vendor in os=3Dgnu ;; arm*-semi) - os=3Daout + os=3D + obj=3Daout ;; c4x-* | tic4x-*) - os=3Dcoff + os=3D + obj=3Dcoff ;; c8051-*) - os=3Delf + os=3D + obj=3Delf ;; clipper-intergraph) os=3Dclix ;; hexagon-*) - os=3Delf + os=3D + obj=3Delf ;; tic54x-*) - os=3Dcoff + os=3D + obj=3Dcoff ;; tic55x-*) - os=3Dcoff + os=3D + obj=3Dcoff ;; tic6x-*) - os=3Dcoff + os=3D + obj=3Dcoff ;; # This must come before the *-dec entry. pdp10-*) @@ -1592,19 +1586,24 @@ case $cpu-$vendor in os=3Dsunos3 ;; m68*-cisco) - os=3Daout + os=3D + obj=3Daout ;; mep-*) - os=3Delf + os=3D + obj=3Delf ;; mips*-cisco) - os=3Delf + os=3D + obj=3Delf ;; mips*-*) - os=3Delf + os=3D + obj=3Delf ;; or32-*) - os=3Dcoff + os=3D + obj=3Dcoff ;; *-tti) # must be before sparc entry or we get the wrong os. os=3Dsysv3 @@ -1613,7 +1612,8 @@ case $cpu-$vendor in os=3Dsunos4.1.1 ;; pru-*) - os=3Delf + os=3D + obj=3Delf ;; *-be) os=3Dbeos @@ -1694,10 +1694,12 @@ case $cpu-$vendor in os=3Duxpv ;; *-rom68k) - os=3Dcoff + os=3D + obj=3Dcoff ;; *-*bug) - os=3Dcoff + os=3D + obj=3Dcoff ;; *-apple) os=3Dmacos @@ -1715,7 +1717,8 @@ esac =20 fi =20 -# Now, validate our (potentially fixed-up) OS. +# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). + case $os in # Sometimes we do "kernel-libc", so those need to count as OSes. musl* | newlib* | relibc* | uclibc*) @@ -1726,6 +1729,9 @@ case $os in # VxWorks passes extra cpu info in the 4th filed. simlinux | simwindows | spe) ;; + # See `case $cpu-$os` validation below + ghcjs) + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. @@ -1734,7 +1740,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ - | os9* | macos* | osx* | ios* \ + | os9* | macos* | osx* | ios* | tvos* | watchos* \ | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ @@ -1743,11 +1749,11 @@ case $os in | mirbsd* | netbsd* | dicos* | openedition* | ose* \ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | bosx* | nextstep* | cxux* | oabi* \ + | ptx* | ecoff* | winnt* | domain* | vsta* \ | udi* | lites* | ieee* | go32* | aux* | hcos* \ | chorusrdb* | cegcc* | glidix* | serenity* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | cygwin* | msys* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | mint* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | interix* | uwin* | mks* | rhapsody* | darwin* \ @@ -1771,56 +1777,95 @@ case $os in kernel* | msvc* ) # Restricted further below ;; + '') + if test x"$obj" =3D x + then + echo "Invalid configuration '$1': Blank OS only allowed with explicit m= achine code file format" 1>&2 + fi + ;; *) echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac =20 +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; + *) + echo "Invalid configuration '$1': Machine code format '$obj' not recogni= zed" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$o= bj'" 1>&2 + exit 1 + ;; +esac + # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) +case $kernel-$os-$obj in + linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ + | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) ;; - uclinux-uclibc* ) + uclinux-uclibc*- ) ;; - managarm-mlibc* | managarm-kernel* ) + managarm-mlibc*- | managarm-kernel*- ) ;; - windows*-gnu* | windows*-msvc*) + windows*-msvc*-) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) + -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; - -kernel* ) + -kernel*- ) echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; - *-kernel* ) + *-kernel*- ) echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; - *-msvc* ) + *-msvc*- ) echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) + kfreebsd*-gnu*- | kopensolaris*-gnu*-) ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; - nto-qnx*) + nto-qnx*-) ;; - os2-emx) + os2-emx-) + ;; + *-eabi*- | *-gnueabi*-) ;; - *-eabi* | *-gnueabi*) + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format ;; - -*) + -*-) # Blank kernel with real OS is always fine. ;; - *-*) + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) echo "Invalid configuration '$1': Kernel '$kernel' not known to work wit= h OS '$os'." 1>&2 exit 1 ;; @@ -1904,7 +1949,7 @@ case $vendor in ;; esac =20 -echo "$cpu-$vendor-${kernel:+$kernel-}$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit =20 # Local variables: