Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.9
-
None
-
a72077a88 (dev), 8181c4868 (6.9), 73a74d440 (6.8), e9e8364be (tqtc/lts-6.5)
Description
A specific build combination causes a build error:
- GCC < 15
- TSAN enabled (-DFEATURE_sanitize_thread=ON)
- developer build (-DFEATURE_developer_build=ON – which in turn enables -Werror)
- PCH enabled (on by default)
The error is:
In function ‘void std::atomic_thread_fence(memory_order)’,
inlined from ‘TestNamespace::QtGlobalStatic::Holder<QGS>::~Holder() [with QGS = TestNamespace::{anonymous}::Q_QGS_sharedData]’ at qtbase/src/corelib/global/qglobalstatic.h:51:33:
/g/gcc-14/include/c++/14.2.0/bits/atomic_base.h:146:26: error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Werror=tsan]
146 | { __atomic_thread_fence(int(__m)); }
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
cc1plus: all warnings being treated as errors
That code is actually protected by a pragma, disabling the warning; but pragmas are not fully honored in PCHs due to this GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117
Disabling PCH fixes the issue in such a config.