···11-This commit causes gnu-config to recognize the *-*-uefi triples.22-33-These triples describe binaries which use the PE object file format44-and UEFI calling "convention" (which is actually a family of55-completely unrelated calling conventions, one per CPU architecture):66-77-- https://uefi.org/specs/UEFI/2.9_A/02_Overview.html#detailed-calling-convention88-- 99-https://uefi.org/specs/UEFI/2.9_A/02_Overview.html#detailed-calling-convention-11010-- 1111-https://uefi.org/specs/UEFI/2.9_A/02_Overview.html#detailed-calling-convention-21212-- https://wiki.osdev.org/UEFI#Calling_Conventions1313-1414-This is in contrast to the *-w64-mingw32 triple of GNU-EFI, which1515-uses the ELF format and cdecl calling convention:1616-1717-- https://wiki.osdev.org/UEFI#Calling_Conventions1818-1919-Because *-*-uefi uses a different object file format (everywhere)2020-and calling convention (everywhere except x86_32) from2121-*-w64-mingw32, the resulting binaries cannot be linked against each2222-other. This is the primary justification for introducing a new2323-triple.2424-2525-Since gnu-config does not yet have triples for these builds, we2626-might as well use the same ones already selected by LLVM. It2727-considers uefi to be an operating system:2828-2929-- https://reviews.llvm.org/D1315943030-3131-* config.sub (*-*-uefi): Recognize.3232-3333-Signed-off-by: Adam Joseph <adam@westernsemico.com>3434-X-Disclaimer: This commit shall not be construed as the author's approval of 3535-the UEFI boondoggle in any way, shape or form.3636----3737- config.sub | 9 +++++++++3838- 1 files changed, 9 insertions(+)3939-4040-diff --git i/config.sub w/config.sub4141-index defe52c..b2078d9 1007554242---- i/config.sub4343-+++ w/config.sub4444-@@ -1772,6 +1772,13 @@ case $os in4545- sco3.2v2 | sco3.2v[4-9]* | sco5v6*)4646- # Don't forget version if it is 3.2v4 or newer.4747- ;;4848-+ # This refers to builds using the UEFI calling convention4949-+ # (which depends on the architecture) and PE file format.5050-+ # Note that this is both a different calling convention and5151-+ # different file format than that of GNU-EFI5252-+ # (x86_64-w64-mingw32).5353-+ uefi)5454-+ ;;5555- none)5656- ;;5757- kernel* | msvc* )5858-@@ -1859,6 +1866,8 @@ case $kernel-$os-$obj in5959- # None (no kernel, i.e. freestanding / bare metal),6060- # can be paired with an machine code file format6161- ;;6262-+ -uefi)6363-+ ;;6464- -*-)6565- # Blank kernel with real OS is always fine.6666- ;;