diff options
author | Andreas Enge <andreas@enge.fr> | 2023-04-13 11:46:47 +0200 |
---|---|---|
committer | Andreas Enge <andreas@enge.fr> | 2023-04-13 18:53:42 +0200 |
commit | 9900f9e9b86550e7d336b04ad46fba088e28cbd6 (patch) | |
tree | 91bd16bd70e66d2ec42c0049fbca3e45137a6803 /gnu/packages/patches | |
parent | a957171bc41e98e29674f99cf3dd2940ff45a0d3 (diff) | |
download | guix-9900f9e9b86550e7d336b04ad46fba088e28cbd6.tar.gz |
gnu: gcc-11: Fix build on powerpc64le.
* gnu/packages/patches/gcc-11-libstdc++-powerpc.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/gcc.scm (make-libstdc++): Apply patch for gcc versions >= 11 and < 12 on ppc64le. Co-authored-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/gcc-11-libstdc++-powerpc.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/packages/patches/gcc-11-libstdc++-powerpc.patch b/gnu/packages/patches/gcc-11-libstdc++-powerpc.patch new file mode 100644 index 0000000000..aff2ef16f1 --- /dev/null +++ b/gnu/packages/patches/gcc-11-libstdc++-powerpc.patch @@ -0,0 +1,18 @@ +diff -u -r gcc-11.3.0.alt/libstdc++-v3/src/c++17/floating_from_chars.cc gcc-11.3.0/libstdc++-v3/src/c++17/floating_from_chars.cc +--- gcc-11.3.0.alt/libstdc++-v3/src/c++17/floating_from_chars.cc 2023-04-13 11:36:08.169841428 +0200 ++++ gcc-11.3.0/libstdc++-v3/src/c++17/floating_from_chars.cc 2023-04-13 11:36:54.825827304 +0200 +@@ -495,8 +495,14 @@ + from_chars(const char* first, const char* last, __ieee128& value, + chars_format fmt) noexcept + { ++#if _GLIBCXX_USE_CXX11_ABI + buffer_resource mr; + pmr::string buf(&mr); ++#else ++ string buf; ++ if (!reserve_string(buf)) ++ return make_result(first, 0, {}, ec); ++#endif + size_t len = 0; + errc ec = errc::invalid_argument; + __try |