summaryrefslogtreecommitdiff
path: root/dev-util/nvidia-cuda-toolkit/files/nvidia-cuda-toolkit-glibc-2.41-r1.patch
blob: 315630273db6ef860364833a2b86c220d9f9bcb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From cae8ab12c9f981f110bb2e1318d9c5306e3a2d81 Mon Sep 17 00:00:00 2001
From: Paul Zander <negril.nx@gmail.com>
Date: Sat, 8 Feb 2025 16:34:42 +0100
Subject: [PATCH] Updates headers for glibc-2.41

Match the extern definitions in cuda-crt headers with the changes in glibc-2.41.

/usr/include/bits/mathcalls.h(79): error: exception specification is
incompatible with that of previous function "cospi" (declared at line 2601
of
/opt/cuda-12.8.0/bin/../targets/x86_64-linux/include/crt/math_functions.h)

   extern double cospi (double __x) noexcept (true); extern double __cospi (double __x) noexcept (true);

See-Also: https://sourceware.org/git/?p=glibc.git;a=commit;h=0ae0af68d8fa3bf6cbe1e4f1de5929ff71de67b3
Signed-off-by: Paul Zander <negril.nx@gmail.com>

diff --git a/builds/cuda_nvcc/targets/x86_64-linux/include/crt/math_functions.h b/builds/cuda_nvcc/targets/x86_64-linux/include/crt/math_functions.h
index d8201f9..a9b19d4 100644
--- a/builds/cuda_nvcc/targets/x86_64-linux/include/crt/math_functions.h
+++ b/builds/cuda_nvcc/targets/x86_64-linux/include/crt/math_functions.h
@@ -2553,7 +2553,11 @@ extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  rcbrt
  *
  * \note_accuracy_double
  */
+#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 41
+extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 sinpi(double x) noexcept (true);
+#else
 extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 sinpi(double x);
+#endif
 /**
  * \ingroup CUDA_MATH_SINGLE
  * \brief Calculate the sine of the input argument 
@@ -2576,7 +2580,11 @@ extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 sinpi
  *
  * \note_accuracy_single
  */
+#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 41
+extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  sinpif(float x) noexcept (true);
+#else
 extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  sinpif(float x);
+#endif
 /**
  * \ingroup CUDA_MATH_DOUBLE
  * \brief Calculate the cosine of the input argument 
@@ -2598,7 +2606,11 @@ extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  sinpi
  *
  * \note_accuracy_double
  */
+#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 41
+extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 cospi(double x) noexcept (true);
+#else
 extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 cospi(double x);
+#endif
 /**
  * \ingroup CUDA_MATH_SINGLE
  * \brief Calculate the cosine of the input argument 
@@ -2620,7 +2632,11 @@ extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 cospi
  *
  * \note_accuracy_single
  */
+#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 41
+extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  cospif(float x) noexcept (true);
+#else
 extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  cospif(float x);
+#endif
 /**
  * \ingroup CUDA_MATH_DOUBLE
  * \brief  Calculate the sine and cosine of the first input argument 
-- 
2.48.1