config.sub: Accept $cpu-$vendor-none-{coff,elf}

These are not real OSes, they are object file formats. There is a
longstanding tradition of using them for embedded/freestanding
programming, so it makes sense to parse them with `kernel=none`.

(I have a WIP future patch that systematizes parsing these non-OSes a
bit more. That also opens the door to parsing a 5th component as LLVM
can do.)

This change unblocks an issue we've been having with Nixpkgs (see
https://github.com/NixOS/nixpkgs/issues/165836 for the longer version).

* config.sub (none-coff*, none-elf*): Recognize.
* testsuite/config-sub.data (arm-unknown-none-coff,
arm-unknown-none-elf, riscv64-company-none-elf): New tests.
* doc/config.sub.1: Regenerate.
This commit is contained in:
John Ericson
2023-07-04 18:52:51 -04:00
committed by Dmitry V. Levin
parent 91f6a7f616
commit 998ba14143
3 changed files with 9 additions and 2 deletions

6
config.sub vendored
View File

@ -4,7 +4,7 @@
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2023-06-26'
timestamp='2023-07-04'
# 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
@ -1816,6 +1816,10 @@ case $kernel-$os in
;;
*-eabi* | *-gnueabi*)
;;
none-coff* | none-elf*)
# None (no kernel, i.e. freestanding / bare metal),
# can be paired with an output format "OS"
;;
-*)
# Blank kernel with real OS is always fine.
;;