summaryrefslogtreecommitdiffstats
path: root/debian/patches/cuda-float128.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:58:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:58:36 +0000
commit1d3b23e6bdbf53eb74161c37d8c355c2ec858a19 (patch)
treee279a67ec4f447e99b0754e7964666f7b48b5c05 /debian/patches/cuda-float128.diff
parentAdding upstream version 14-20240201. (diff)
downloadgcc-14-1d3b23e6bdbf53eb74161c37d8c355c2ec858a19.tar.xz
gcc-14-1d3b23e6bdbf53eb74161c37d8c355c2ec858a19.zip
Adding debian version 14-20240201-3.debian/14-20240201-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/cuda-float128.diff')
-rw-r--r--debian/patches/cuda-float128.diff46
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/patches/cuda-float128.diff b/debian/patches/cuda-float128.diff
new file mode 100644
index 0000000..0fdaf12
--- /dev/null
+++ b/debian/patches/cuda-float128.diff
@@ -0,0 +1,46 @@
+# Mask __float128 types from CUDA compilers (LP: #1717257)
+
+--- a/src/libstdc++-v3/include/std/type_traits
++++ b/src/libstdc++-v3/include/std/type_traits
+@@ -509,7 +509,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ : public true_type { };
+ #endif
+
+-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
+ template<>
+ struct __is_floating_point_helper<__float128>
+ : public true_type { };
+--- a/src/libstdc++-v3/include/bits/std_abs.h
++++ b/src/libstdc++-v3/include/bits/std_abs.h
+@@ -131,7 +131,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ { return __gnu_cxx::__bfloat16_t(__builtin_fabsf(__x)); }
+ #endif
+
+-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
+ __extension__ inline _GLIBCXX_CONSTEXPR
+ __float128
+ abs(__float128 __x)
+--- a/src/libstdc++-v3/include/bits/stl_algobase.h
++++ b/src/libstdc++-v3/include/bits/stl_algobase.h
+@@ -1060,7 +1060,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
+ __size_to_integer(double __n) { return (long long)__n; }
+ inline _GLIBCXX_CONSTEXPR long long
+ __size_to_integer(long double __n) { return (long long)__n; }
+-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
+ __extension__ inline _GLIBCXX_CONSTEXPR long long
+ __size_to_integer(__float128 __n) { return (long long)__n; }
+ #endif
+--- a/src/libstdc++-v3/include/std/numbers
++++ b/src/libstdc++-v3/include/std/numbers
+@@ -221,7 +221,7 @@ __glibcxx_numbers (_Float128, F128);
+ __glibcxx_numbers (__gnu_cxx::__bfloat16_t, BF16);
+ #endif
+
+-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
+ __glibcxx_numbers (__float128, Q);
+ #endif // USE_FLOAT128
+