From b58295029c49b8e684a9746845d8b42c07502c39 Mon Sep 17 00:00:00 2001 From: Slava Zakharin Date: Tue, 11 Mar 2025 14:10:51 -0700 Subject: [PATCH] [flang-rt] Set HAVE_LDBL_MANT_DIG_113. This check enables flang_rt.quadmath build on aarch64. --- flang-rt/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/flang-rt/CMakeLists.txt b/flang-rt/CMakeLists.txt index e3dcd504cf532..70b114041b7fd 100644 --- a/flang-rt/CMakeLists.txt +++ b/flang-rt/CMakeLists.txt @@ -223,7 +223,6 @@ check_cxx_source_compiles( " HAVE_DECL_STRERROR_S) - # Search for clang_rt.builtins library. Need in addition to msvcrt. if (WIN32) find_compiler_rt_library(builtins FLANG_RT_BUILTINS_LIBRARY) @@ -294,6 +293,15 @@ elseif (FLANG_RT_GCC_RESOURCE_DIR) endif () endif () +# Check if 128-bit float computations can be done via long double. +check_cxx_source_compiles( + "#include + #if LDBL_MANT_DIG != 113 + #error LDBL_MANT_DIG != 113 + #endif + int main() { return 0; } + " + HAVE_LDBL_MANT_DIG_113) #####################