[libc] Fix detection of cfloat128 (#185486) Building compiler-rt with aarch64-buildroot-linux-gnu-gcc 15.2 causes a build error: ``` compiler-rt-22.1.0/cmake/Modules/../../libc/src/__support/CPP/type_traits/is_complex.h:44:31: error: 'cfloat128' was not declared in this scope; did you mean 'float128'? [-Wtemplate-body] ``` According to https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Floating-Types.html __float128 is not available on aarch64. Analyzing the gcc defines for aarch64 seems to prove it: ``` $ aarch64-buildroot-linux-gnu-gcc -v Target: aarch64-buildroot-linux-gnu gcc version 15.2.0 (Buildroot 2026.02-114-gdadec9da56) $ echo | aarch64-buildroot-linux-gnu-gcc -dM -E - | grep __GCC_IEC_559_COMPLEX #define __GCC_IEC_559_COMPLEX 2 $ echo | aarch64-buildroot-linux-gnu-gcc -dM -E - | grep __STDC_IEC_60559_COMPLEX__ #define __STDC_IEC_60559_COMPLEX__ 201404L $ echo | aarch64-buildroot-linux-gnu-gcc -dM -E - | grep -i float128 $ ``` In contrast gcc for x86_64: ``` $ x86_64-buildroot-linux-gnu-gcc -v Target: x86_64-buildroot-linux-gnu gcc version 15.2.0 (Buildroot 2026.02-112-gd12ac02486) $ echo | x86_64-buildroot-linux-gnu-gcc -dM -E - | grep __GCC_IEC_559_COMPLEX #define __GCC_IEC_559_COMPLEX 2 $ echo | x86_64-buildroot-linux-gnu-gcc -dM -E - | grep __STDC_IEC_60559_COMPLEX__ #define __STDC_IEC_60559_COMPLEX__ 201404L $ echo | x86_64-buildroot-linux-gnu-gcc -dM -E - | grep -i float128 #define __SIZEOF_FLOAT128__ 16 ``` This patch changes the or-condition to an and-condition for \_\_STDC_IEC_60559_COMPLEX\_\_ and \_\_SIZEOF_FLOAT128\_\_. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.