onetbb: fix build with gcc15

- add patch from merged upstream PR:
https://www.github.com/uxlfoundation/oneTBB/pull/1831
https://github.com/uxlfoundation/oneTBB/commit/712ad98443300aab202f5e93a76472d59b79752a

Fixes build failure with gcc15:
```
FAILED: [code=1] test/CMakeFiles/test_concurrent_unordered_map.dir/tbb/test_concurrent_unordered_map.cpp.o
...
/nix/store/rd8c9w16nwys8yz1a9j2g2nhjn07464r-gcc-15.2.0/include/c++/15.2.0/bits/new_allocator.h:198:11:
error: array subscript 2 is outside array bounds of
'StaticSharedCountingAllocator<std::allocator<tbb::detail::d2::list_node<long unsigned int> > >::value_type [1]'
{aka 'tbb::detail::d2::list_node<long unsigned int> [1]'} [-Werror=array-bounds=]
  198 |         { __p->~_Up(); }
      |           ^~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
...
FAILED: [code=1] test/CMakeFiles/test_concurrent_unordered_set.dir/tbb/test_concurrent_unordered_set.cpp.o
...
/build/source/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:172:20:
error: array subscript 'tbb::detail::d2::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >,
long unsigned int>[0]' is partly outside array bounds of 'unsigned char [16]' [-Werror=array-bounds=]
  172 |     ~value_node() {}
      |                    ^
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
```
This commit is contained in:
ghpzin
2025-09-25 22:51:12 +03:00
parent bdc3cdda42
commit ecd11a12cb
+8
View File
@@ -49,6 +49,14 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://github.com/uxlfoundation/oneTBB/commit/e57411968661ab1205322ba1c84fc1cd90a306c6.patch";
hash = "sha256-PFixW4lYqA5oy4LSwewvxgJbjVKJceRHnp8mgW9zBF0=";
})
# Fix build with gcc15
# <https://github.com/uxlfoundation/oneTBB/pull/1831>
(fetchpatch {
name = "onetbb-fix-gcc15-build.patch";
url = "https://github.com/uxlfoundation/oneTBB/commit/712ad98443300aab202f5e93a76472d59b79752a.patch";
hash = "sha256-4qoVCy3xQZK6Vp471miE79FSrU0D0Iu6KWMJ08m0EsE=";
})
];
nativeBuildInputs = [