From 5b83c2ff5da15451cb566e1837253d0f60543dd7 Mon Sep 17 00:00:00 2001 From: Alfred Persson Forsberg Date: Thu, 19 Oct 2023 20:55:40 +0200 Subject: [PATCH] config.sub: add LLVM-libc support * config.sub (*-linux-llvm): Recognize. * doc/config.sub.1: Regenerate. * testsuite/config-sub.data: Add x86_64-linux-llvm. Signed-off-by: Alfred Persson Forsberg Signed-off-by: Dmitry V. Levin --- config.sub | 12 +++++++----- doc/config.sub.1 | 2 +- testsuite/config-sub.data | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config.sub b/config.sub index defe52c..d036c7f 100755 --- a/config.sub +++ b/config.sub @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2023-09-19' +timestamp='2023-10-19' # 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 @@ -1721,7 +1721,7 @@ fi case $os in # Sometimes we do "kernel-libc", so those need to count as OSes. - musl* | newlib* | relibc* | uclibc*) + llvm* | musl* | newlib* | relibc* | uclibc*) ;; # Likewise for "kernel-abi" eabi* | gnueabi*) @@ -1818,8 +1818,9 @@ 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-$obj in - linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ - | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- ) ;; uclinux-uclibc*- ) ;; @@ -1827,7 +1828,8 @@ case $kernel-$os-$obj in ;; windows*-msvc*-) ;; - -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- ) + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ + | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 diff --git a/doc/config.sub.1 b/doc/config.sub.1 index 01102c2..4badf8b 100644 --- a/doc/config.sub.1 +++ b/doc/config.sub.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5. -.TH CONFIG.SUB "1" "September 2023" "GNU config.sub (2023-09-19)" "User Commands" +.TH CONFIG.SUB "1" "October 2023" "GNU config.sub (2023-10-19)" "User Commands" .SH NAME config.sub \- validate and canonicalize a configuration triplet .SH SYNOPSIS diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data index f36bea2..ddb6168 100644 --- a/testsuite/config-sub.data +++ b/testsuite/config-sub.data @@ -881,6 +881,7 @@ x86_64-ericsson-dicos x86_64-ericsson-dicos x86_64-fuchsia x86_64-pc-fuchsia x86_64-genode x86_64-pc-genode x86_64-glidix x86_64-pc-glidix +x86_64-linux-llvm x86_64-pc-linux-llvm x86_64-linux-mlibc x86_64-pc-linux-mlibc x86_64-linux-relibc x86_64-pc-linux-relibc x86_64-managarm x86_64-pc-managarm-mlibc