From 2cb04444b934e000a4e36c1876ef2bf03dd80d66 Mon Sep 17 00:00:00 2001 From: koraynilay Date: Sat, 22 Feb 2025 15:55:59 +0100 Subject: [PATCH] math: Fix `unknown type name '__float128'` for clang 3.4 to 3.8.1 (bug 32694) When compiling a program that includes using a clang version between 3.4 (included) and 3.8.1 (included), clang will fail with `unknown type name '__float128'; did you mean '__cfloat128'?`. This changes fixes the clang prerequirements macro call in floatn.h to check for clang 3.9 instead of 3.4, since support for __float128 was actually enabled in 3.9 by: commit 50f29e06a1b6a38f0bba9360cbff72c82d46cdd4 Author: Nemanja Ivanovic Date: Wed Apr 13 09:49:45 2016 +0000 Enable support for __float128 in Clang This fixes bug 32694. Signed-off-by: koraynilay Reviewed-by: H.J. Lu (cherry picked from commit 29803ed3ce420f01e7c567c97fc8945d5e5e5992) --- sysdeps/x86/bits/floatn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/x86/bits/floatn.h b/sysdeps/x86/bits/floatn.h index adc7ed2e9e..4674165bd7 100644 --- a/sysdeps/x86/bits/floatn.h +++ b/sysdeps/x86/bits/floatn.h @@ -31,7 +31,7 @@ #if (defined __x86_64__ \ ? __GNUC_PREREQ (4, 3) \ : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) \ - || (__glibc_clang_prereq (3, 4) \ + || (__glibc_clang_prereq (3, 9) \ && (!defined __INTEL_LLVM_COMPILER \ || !defined SYCL_LANGUAGE_VERSION)) # define __HAVE_FLOAT128 1 @@ -93,7 +93,7 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); /* The type _Float128 exists only since GCC 7.0. */ # if !__GNUC_PREREQ (7, 0) \ || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) \ - || __glibc_clang_prereq (3, 4) + || __glibc_clang_prereq (3, 9) typedef __float128 _Float128; # endif