From 237a83da197adf6d0a70d715812182df77fa5bf7 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 3 Nov 2025 18:55:06 +0300 Subject: [PATCH] libstdc++: adjust std module TBB workaround Messing with macros before possibly importing the stdc++.h header unit is bad form; better to mess with (other) macros afterward. libstdc++-v3/ChangeLog: * src/c++23/std.cc.in: Move TBB macro shenanigans after bits/stdc++.h. --- libstdc++-v3/src/c++23/std.cc.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/std.cc.in index 11a8d4fb486..27d83f1ba1b 100644 --- a/libstdc++-v3/src/c++23/std.cc.in +++ b/libstdc++-v3/src/c++23/std.cc.in @@ -23,11 +23,14 @@ module; +#include + // stdc++.h doesn't include because of TBB issues; // FIXME for now let's avoid the problem by suppressing TBB. -#define _GLIBCXX_USE_TBB_PAR_BACKEND 0 - -#include +#ifdef _PSTL_PAR_BACKEND_TBB +#undef _PSTL_PAR_BACKEND_TBB +#define _PSTL_PAR_BACKEND_SERIAL +#endif #include // Module std does include deprecated library interfaces. -- 2.47.3