From 0e1c9977e9325f4dec21c46a80badf3b525aed48 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 20 May 2022 07:55:35 +0100 Subject: [PATCH] tbb: pull fix pending upstream inclusion for gcc-13 support Without the change build fails on upcoming gcc-13 as: ../../include/tbb/task.h:300:20: error: declaration of 'tbb::task& tbb::internal::task_prefix::task()' changes meaning of 'task' [-fpermissive] 300 | tbb::task& task() {return *reinterpret_cast(this+1);} | ^~~~ ../../include/tbb/task.h:252:9: note: used here to mean 'class tbb::task' 252 | task* next_offloaded; | ^~~~ ../../include/tbb/task.h:43:7: note: declared here 43 | class task; | ^~~~ --- pkgs/development/libraries/tbb/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/development/libraries/tbb/default.nix index 7913f05354d..1d739810e9e 100644 --- a/pkgs/development/libraries/tbb/default.nix +++ b/pkgs/development/libraries/tbb/default.nix @@ -28,6 +28,14 @@ stdenv.mkDerivation rec { url = "https://github.com/openembedded/meta-openembedded/raw/39185eb1d1615e919e3ae14ae63b8ed7d3e5d83f/meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch"; sha256 = "fhorfqO1hHKZ61uq+yTR7eQ8KYdyLwpM3K7WpwJpV74="; }) + + # Fixes build with upcoming gcc-13: + # https://github.com/oneapi-src/oneTBB/pull/833 + (fetchurl { + name = "gcc-13.patch"; + url = "https://github.com/oneapi-src/oneTBB/pull/833/commits/c18342ba667d1f33f5e9a773aa86b091a9694b97.patch"; + sha256 = "ZUExE3nsW80Z5GPWZnDNuDiHHaD1EF7qNl/G5M+Wcxg="; + }) ]; nativeBuildInputs = lib.optionals stdenv.isDarwin [