Skip to content

Enable position independent code unconditionally with Qt6

Volker Krause requested to merge work/qt6-enable-pic-unconditionally into master

Qt6 does no long force this on consumers when built without reduced relocations. If we enable our counterpart to that (-bsymbolic-functions), which KF does, we need position independent code on all consumers as well in order to not break function pointer based connects or method/signal lookups. For executables PIE is enough it seems, which is what CMake policy CMP0083 enables.

This fixes various unit test failures observed on the current Qt6 CI, and is an alternative approach to the solution proposed in !222 (merged).

Merge request reports