]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: adjust std module TBB workaround
authorJason Merrill <jason@redhat.com>
Mon, 3 Nov 2025 15:55:06 +0000 (18:55 +0300)
committerJason Merrill <jason@redhat.com>
Mon, 3 Nov 2025 15:55:06 +0000 (18:55 +0300)
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

index 11a8d4fb486f6ff60c1e66ecb2fa730c05c3cda0..27d83f1ba1b751b74d950702181bc54e10d098ad 100644 (file)
 
 module;
 
+#include <bits/stdc++.h>
+
 // stdc++.h doesn't include <execution> because of TBB issues;
 // FIXME for now let's avoid the problem by suppressing TBB.
-#define _GLIBCXX_USE_TBB_PAR_BACKEND 0
-
-#include <bits/stdc++.h>
+#ifdef _PSTL_PAR_BACKEND_TBB
+#undef _PSTL_PAR_BACKEND_TBB
+#define _PSTL_PAR_BACKEND_SERIAL
+#endif
 #include <execution>
 
 // Module std does include deprecated library interfaces.