]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86 (__HAVE_FLOAT128): Defined to 0 for Intel SYCL compiler [BZ #32723]
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 19 Feb 2025 23:08:26 +0000 (07:08 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 20 Feb 2025 00:42:37 +0000 (08:42 +0800)
Intel compiler always defines __INTEL_LLVM_COMPILER.  When SYCL is
enabled by -fsycl, it also defines SYCL_LANGUAGE_VERSION.  Since Intel
SYCL compiler doesn't support _Float128:

https://github.com/intel/llvm/issues/16903

define __HAVE_FLOAT128 to 0 for Intel SYCL compiler.

This fixes BZ #32723.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
sysdeps/x86/bits/floatn.h

index d197cb10dde016d2160167deaecf0f139d4f67ae..adc7ed2e9e861c306fe9cdc371e767eda56ec8c4 100644 (file)
    floating-point type with the IEEE 754 binary128 format, and this
    glibc includes corresponding *f128 interfaces for it.  The required
    libgcc support was added some time after the basic compiler
-   support, for x86_64 and x86.  */
+   support, for x86_64 and x86.  Intel SYCL compiler doesn't support
+   _Float128: https://github.com/intel/llvm/issues/16903
+  */
 #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, 4)                                    \
+       && (!defined __INTEL_LLVM_COMPILER                              \
+           || !defined SYCL_LANGUAGE_VERSION))
 # define __HAVE_FLOAT128 1
 #else
 # define __HAVE_FLOAT128 0