diff options
author | jameshu15869 <55058507+jameshu15869@users.noreply.github.com> | 2024-02-29 22:04:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 21:04:02 -0600 |
commit | 39c24c52f641849a648e3b01310ed7c3f2c8d91b (patch) | |
tree | 8e4b956ab693930b247b75dae06d0bba5f3b7c7e /libc/cmake | |
parent | 5b6e58c565cf809e4133a10ff9d9b096754bea1e (diff) | |
download | llvm-39c24c52f641849a648e3b01310ed7c3f2c8d91b.zip llvm-39c24c52f641849a648e3b01310ed7c3f2c8d91b.tar.gz llvm-39c24c52f641849a648e3b01310ed7c3f2c8d91b.tar.bz2 |
[libc] Allow libc to build on Red Hat (#83517)
Currently, `libc` fails when building on redhat because the triple
format uses `redhat` instead of `linux` (The same problem as openSUSE).
This PR changes `libc` to accept `redhat` as a valid Linux triple.
---------
Co-authored-by: Joseph Huber <huberjn@outlook.com>
Diffstat (limited to 'libc/cmake')
-rw-r--r-- | libc/cmake/modules/LLVMLibCArchitectures.cmake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake index 0dbc59a..dacb4db 100644 --- a/libc/cmake/modules/LLVMLibCArchitectures.cmake +++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake @@ -167,13 +167,14 @@ if(LIBC_TARGET_OS STREQUAL "baremetal") set(LIBC_TARGET_OS_IS_BAREMETAL TRUE) elseif(LIBC_TARGET_OS STREQUAL "linux") set(LIBC_TARGET_OS_IS_LINUX TRUE) -elseif(LIBC_TARGET_OS STREQUAL "poky" OR LIBC_TARGET_OS STREQUAL "suse") - # poky are ustom Linux-base systems created by yocto. Since these are Linux +elseif(LIBC_TARGET_OS STREQUAL "poky" OR LIBC_TARGET_OS STREQUAL "suse" OR + LIBC_TARGET_OS STREQUAL "redhat") + # poky are custom Linux-base systems created by yocto. Since these are Linux # images, we change the LIBC_TARGET_OS to linux. This define is used to # include the right directories during compilation. # - # openSUSE uses different triple format which causes LIBC_TARGET_OS to be - # computed as "suse" instead of "linux". + # openSUSE and redhat use different triple format which causes LIBC_TARGET_OS + # to be computed as "suse" or "redhat" instead of "linux". set(LIBC_TARGET_OS_IS_LINUX TRUE) set(LIBC_TARGET_OS "linux") elseif(LIBC_TARGET_OS STREQUAL "darwin") |