config.sub: recognize *-*-uefi

This commit causes gnu-config to recognize the *-*-uefi triples.

These triples describe binaries which use the PE object file format
and UEFI calling "convention" (which is actually a family of
completely unrelated calling conventions, one per CPU architecture):

- https://uefi.org/specs/UEFI/2.9_A/02_Overview.html#detailed-calling-convention
- https://uefi.org/specs/UEFI/2.9_A/02_Overview.html#detailed-calling-convention-1
- https://uefi.org/specs/UEFI/2.9_A/02_Overview.html#detailed-calling-convention-2
- https://wiki.osdev.org/UEFI#Calling_Conventions

This is in contrast to the *-w64-mingw32 triple of GNU-EFI, which
uses the ELF format and cdecl calling convention:

- https://wiki.osdev.org/UEFI#Calling_Conventions

Because *-*-uefi uses a different object file format (everywhere)
and calling convention (everywhere except x86_32) from
*-w64-mingw32, the resulting binaries cannot be linked against each
other.  This is the primary justification for introducing a new
triple.

Since gnu-config does not yet have triples for these builds, we
might as well use the same ones already selected by LLVM.  It
considers uefi to be an operating system:

- https://reviews.llvm.org/D131594

* config.sub (*-*-uefi): Recognize.
* testsuite/config-sub.data (i686-unknown-uefi, x86_64-unknown-uefi,
  aarch64-unknown-uefi): New entries.

Signed-off-by: Adam Joseph <adam@westernsemico.com>
X-Disclaimer: This commit shall not be construed as the author's approval of the UEFI boondoggle in any way, shape or form.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
Adam Joseph
2023-10-29 23:51:18 -07:00
committed by Dmitry V. Levin
parent d21518c6c8
commit 0e4a5b3a1e
2 changed files with 11 additions and 1 deletions

View File

@ -22,6 +22,7 @@ aarch64-managarm-kernel aarch64-unknown-managarm-kernel
aarch64-managarm-mlibc aarch64-unknown-managarm-mlibc
aarch64-unknown-elf aarch64-unknown-elf
aarch64-unknown-linux aarch64-unknown-linux-gnu
aarch64-unknown-uefi aarch64-unknown-uefi
aarch64-wrs-vxworks aarch64-wrs-vxworks
aarch64-zephyr aarch64-unknown-zephyr
aarch64_be aarch64_be-unknown-none
@ -328,6 +329,7 @@ i686-ericsson-dicos i686-ericsson-dicos
i686-haiku i686-pc-haiku
i686-kopensolaris5.11-gnu i686-pc-kopensolaris5.11-gnu
i686-os2-emx i686-pc-os2-emx
i686-unknown-uefi i686-unknown-uefi
i686-wrs-vxworks i686-wrs-vxworks
i686-wrs-vxworks-simlinux i686-wrs-vxworks-simlinux
i686-wrs-vxworks-simwindows i686-wrs-vxworks-simwindows
@ -898,6 +900,7 @@ x86_64-secbsd x86_64-pc-secbsd
x86_64-sortix x86_64-pc-sortix
x86_64-twizzler x86_64-pc-twizzler
x86_64-unknown-ptx x86_64-sequent-ptx
x86_64-unknown-uefi x86_64-unknown-uefi
x86_64-windows x86_64-pc-windows
x86_64-windows-msvc x86_64-pc-windows-msvc
x86_64-wrs-vxworks x86_64-wrs-vxworks