-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport managarm/gcc@61271f4 into clang compat patch
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff '--color=auto' -urN include/atomic include-patched/atomic | ||
--- include/atomic 2024-09-22 05:50:48.546122362 +0200 | ||
+++ include-patched/atomic 2024-09-22 05:59:15.115746337 +0200 | ||
@@ -1650,6 +1650,7 @@ | ||
using __atomic_float<double>::operator=; | ||
}; | ||
|
||
+#if !(defined(__clang__) && !__STDC_HOSTED__) // clang in kernel context | ||
template<> | ||
struct atomic<long double> : __atomic_float<long double> | ||
{ | ||
@@ -1664,6 +1665,7 @@ | ||
|
||
using __atomic_float<long double>::operator=; | ||
}; | ||
+#endif | ||
|
||
#ifdef __STDCPP_FLOAT16_T__ | ||
template<> | ||
diff '--color=auto' -urN include/bits/stl_algobase.h include-patched/bits/stl_algobase.h | ||
--- include/bits/stl_algobase.h 2024-09-22 05:50:48.546122362 +0200 | ||
+++ include-patched/bits/stl_algobase.h 2024-09-22 05:58:04.080067281 +0200 | ||
@@ -1072,8 +1072,10 @@ | ||
__size_to_integer(float __n) { return (long long)__n; } | ||
inline _GLIBCXX_CONSTEXPR long long | ||
__size_to_integer(double __n) { return (long long)__n; } | ||
+#if !(defined(__clang__) && !__STDC_HOSTED__) // clang in kernel context | ||
inline _GLIBCXX_CONSTEXPR long long | ||
__size_to_integer(long double __n) { return (long long)__n; } | ||
+#endif | ||
#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) | ||
__extension__ inline _GLIBCXX_CONSTEXPR long long | ||
__size_to_integer(__float128 __n) { return (long long)__n; } |