Skip to content
Commit 7ce34f45 authored by Milian Wolff's avatar Milian Wolff
Browse files

Enable PIC globally

We already did this in a few places, but there where more libraries
missing, resulting in linker errors such as:

```
mold: error: lib/libkdevdebuggercommon.a(processselection.cpp.o):(.text):
R_X86_64_PC32 relocation at offset 0x43 against symbol
`KDevMI::ProcessSelectionDialog::staticMetaObject' can not be used; recompile with -fPIC
```

Furthermore, without enabling this globally, we would get similar
errors when we try to compile with ASAN/UBSAN enabled.

By enabling position independent code globally, we fix all this.

Note that Qt requires PIC anyhow, see e.g.:
https://doc.qt.io/qt-5/cmake-get-started.html

The internal Qt6 cmake code also enables PIC. I don't quite
understand why we need to enabled it manually here I have to admit.
parent ef033ab5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment