@nyamatongwe Geany doesn't set `SCI_SETLAYOUTCACHE` so that makes it `SC_CACHE_CARET` IIUC so it is likely Scintilla would have used `libpthread`.
But then Scintilla doesn't use pthreads directly itself, it uses C++ `<mutex>`, although I suppose that might consist of macros over pthread calls making the linker think it does.
I doubt that `libpthread` isn't linked, either via G* or the C++ library, but the `-Wl,-z,defs` makes the linker complain about individual objects having undefined symbols not just the final product IIUC, the docs are brief. Its also not clear to me if that option makes `ld` complain when an object is linked, making it link order dependent. Also GCC docs specifies the use of `-pthread` on both compiler and linker, not explicitly linking `libpthread`, which is why I am concerned about forcing explicitly linking it for systems which work, how do we know it will not conflict with what `-pthread` does.
If Geany doesn't crash under the conditions above where it (via Scintilla) will probably successfully use libpthread then it seems to me that the issue is a false positive from a pedantic warning option that isn't an issue in real life, and as noted the warning doesn't happen on newer systems. As such doing something contrary to GCC docs advice to all builds seems overreach and risky to me.