taskflow: apply debian patch to work around gcc 16 regression (#552472)

This commit is contained in:
Vladimír Čunát
2026-09-09 07:21:46 +00:00
committed by GitHub

View File

@@ -23,6 +23,21 @@ stdenv.mkDerivation (finalAttrs: {
(replaceVars ./unvendor-doctest.patch {
inherit doctest;
})
# GCC 16 has a regression in std::inclusive_scan where it modifies the
# input data instead of leaving it unchanged, causing some incorrect
# behavior and broken tests within taskflow. To work around this, Debian
# reimplemented equivalent correct behavior in one case and copied the
# input in another as appropriate. We adopt their approach to work around
# this regression.
# gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126604
# debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1133642
# taskflow issue: https://github.com/taskflow/taskflow/issues/809
(fetchpatch {
name = "gcc16-inclusive-scan-regression.patch";
url = "https://salsa.debian.org/debian/taskflow/-/raw/039540a03c90cc825ce588f7ffae70db5472428f/debian/patches/fix-gcc16-inclusive-scan-move.patch";
hash = "sha256-A8dUYKtjvvHAOrFGzDjat2hUHO1zoMbfdNnFJLZZbL0=";
})
];
postPatch = ''
@@ -37,8 +52,6 @@ stdenv.mkDerivation (finalAttrs: {
];
cmakeFlags = [
# FIXME remove once Taskflow is updated to 4.0.0
(lib.cmakeFeature "CMAKE_CXX_STANDARD" "20")
# building the tests implies running them in the buildPhase
(lib.cmakeBool "TF_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
];